Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/06/19 14:39:00 (4 years ago)
Author:
dpiringe
Message:

#3026:

  • extended the BaseConverter class to set the type of the extracted value and removed the assignment of type in all other converters
  • fixed a bug in ConfigurableConverter -> now it correctly iterates through all items from an IEnumerable and calls the extract callback
  • MultiCheckedOperatorConverter:
    • deleted unnecessary code line
    • now adds operators to parameters (instead of operator list, because the operator list will get removed in a future commit)
    • does not set the path of its added items anymore
  • ParameterBaseConverter removed unnecessary code lines
  • deleted ParameterBaseConverter
  • reimplemented StorableConverter to test it again (still not really useable, because it bloats the template massively)
  • fixed a pathing bug in ValueParameterConverter (extended ValueRangeConverter, ValueTypeArrayConverter, ValueTypeMatrixConverter, ValueTypeValueConverter to archive this)
  • JCGenerator now only writes a single array with parameters (only FreeParameters) and saves a .hl File to test a new type of implementation of the whole JsonInterface
  • fixed a bug in JsonItem -> now it replaces the name in path of the item (not the whole path as it was before)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ParameterizedItemConverter.cs

    r17339 r17374  
    2020    public override JsonItem ExtractData(IItem value) {
    2121      JsonItem item = new JsonItem();
    22       item.Name = value.ItemName;
    23       item.Type = value.GetType().AssemblyQualifiedName;
     22      var parameterizedItem = value as IParameterizedItem;
    2423
    25       foreach (var param in value.Cast<IParameterizedItem>().Parameters) {
    26         JsonItem data = JsonItemConverter.Extract(param);
    27         data.Name = param.Name;
    28        
    29         if (item.Parameters == null)
    30           item.Parameters = new List<JsonItem>();
    31         item.Parameters.Add(data);
     24      foreach (var param in parameterizedItem.Parameters) {
     25        if(!param.Hidden) {
     26          JsonItem data = JsonItemConverter.Extract(param);
     27          //data.Name = param.Name;
     28
     29          if (item.Parameters == null)
     30            item.Parameters = new List<JsonItem>();
     31          item.Parameters.Add(data);
     32        }
    3233      }
    3334      return item;
Note: See TracChangeset for help on using the changeset viewer.