Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/17/19 17:16:03 (4 years ago)
Author:
dpiringe
Message:

#3026:

  • removed classes:
    • CheckedItemListConverter: unnecessary
    • ItemCollectionConverter: unnecessary
    • PrimitiveConverter: not possible to implement because it needs to Extract/Inject from/into objects (but interfaces pretends IItem)
    • StorableConverter: unnecessary
    • ConfigurableConverter: unnecessary
  • removed graphviz code in Heuristiclab.ConfigStarter/Program.cs
  • updated Constants
  • some simple code refactors in BaseConverter
  • in JsonItem:
    • renamed Parameters -> Children
    • removed Properties: Operators, Type, Reference, IsConfigurable, IsParameterizedItem
    • removed unnecessary/old code
  • implemented a new way to get data from an object, which is a matrix, in ValueTypeMatrixConverter method: CopyMatrixData
    • converts the object into an array -> rows: from array.Length, cols: when the length is > 0 pick length of first array of index 0 (it is saved as an array of arrays)
  • created a binding flag const in ValueRangeConverter to prevent duplicates in code
File:
1 edited

Legend:

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

    r17374 r17379  
    1212      JsonItem data = base.ExtractData(value);
    1313
    14       if(data.Parameters == null)
    15         data.Parameters = new List<JsonItem>();
     14      if(data.Children == null)
     15        data.Children = new List<JsonItem>();
    1616      dynamic val = value.Cast<dynamic>();
    1717      foreach (var op in val.Operators) {
    18         data.Parameters.Add(new JsonItem() {
     18        data.Children.Add(new JsonItem() {
    1919          Name = op.Name,
    2020          Value = val.Operators.ItemChecked(op),
    21           Range = new object[] { false, true }/*,
    22           Path = data.Path + "." + op.Name*/
     21          Range = new object[] { false, true }
    2322        });
    2423      }
     
    3534
    3635    private bool GetOperatorState(string name, JsonItem data) {
    37       foreach(var op in data.Operators) {
    38         if (op.Name == name) return op.Value.Cast<bool>();
     36      foreach(var op in data.Children) {
     37        if (op.Name == name && op.Value is bool) return op.Value.Cast<bool>();
    3938      }
    4039      return false;
Note: See TracChangeset for help on using the changeset viewer.