Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/07/20 16:25:39 (5 years ago)
Author:
dpiringe
Message:

#3026:

  • deleted: ConvertableAttribute, DummyConverter, ObjectExtensions
  • renamed: CustomJsonWriter -> SingleLineArrayJsonWriter, JCInstantiator -> JsonTemplateInstantiator
  • added: JsonItemConverterFactory, UnsupportedJsonItem
  • IJsonItemConverter:
    • added two new properties: Priority and ConvertableType -> because converters are automatically collected by plugin infrastructure now
    • Extract, Inject references a root converter now -> typically an instance of JsonItemConverter -> to prevent cycles
  • JsonItemConverter:
    • now implements the interface IJsonItemConverter
    • is now a dynamic class
    • is only instantiable with an factory (JsonItemConverterFactory)
    • still has the old (but now public) static methods Extract and Inject (without ref param IJsonItemConverter root) -> creates instance with factory and calls methods of instance
    • removed register and unregister methods, because the factory collects all converters automatically now (on first call of Create)
    • has cycle detection for Extract and Inject
    • renamed method Get to GetConverter
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IJsonItemConverter.cs

    r17353 r17394  
    1515    /// <param name="item">The IItem which get the data injected.</param>
    1616    /// <param name="data">The JsonItem with the saved values.</param>
    17     void Inject(IItem item, JsonItem data);
     17    void Inject(IItem item, JsonItem data, IJsonItemConverter root);
    1818
    1919    /// <summary>
     
    2323    /// <param name="value">The IItem to extract infos.</param>
    2424    /// <returns>JsonItem with infos to reinitialise the IItem.</returns>
    25     JsonItem Extract(IItem value);
     25    JsonItem Extract(IItem value, IJsonItemConverter root);
     26
     27    Type ConvertableType { get; }
     28    int Priority { get; }
    2629  }
    2730}
Note: See TracChangeset for help on using the changeset viewer.