Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/22/19 17:32:52 (5 years ago)
Author:
dpiringe
Message:

#3026

  • in JsonItem:
    • renamed property Default to Value
    • removed usage of Reference for ValueLookupParameter
    • created new property ActualName for the actual name and using property Value for the value of an ValueLookupParameter
  • fixed a bug in ValueTypeMatrixConverter -> now it correctly resizes ValueTypeMatrix<T>
  • fixed a bug in ValueParameterConverter -> when ActualValue is null, but there is data for it, a new instance will get created
File:
1 edited

Legend:

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

    r17339 r17342  
    5959      RefactorStaticParameters(obj);
    6060
    61       obj.Property(nameof(JsonItem.Default))?.Remove();
     61      obj.Property(nameof(JsonItem.Value))?.Remove();
    6262      obj.Property(nameof(JsonItem.Type))?.Remove();
    6363
     
    7070      TransformNodes(x => {
    7171        var p = x.ToObject<JsonItem>();
    72         if (p.Default == null || (p.Default != null && p.Default.GetType() == typeof(string) && p.Range == null)) {
     72        if ((p.Value == null || (p.Value != null && p.Value.GetType() == typeof(string) && p.Range == null) && p.ActualName == null)) {
    7373          objToRemove.Add(x);
    7474        } else {
     
    8888        x.Property(nameof(JsonItem.Parameters))?.Remove();
    8989        x.Property(nameof(JsonItem.Type))?.Remove();
    90         if (p.Default == null) objToRemove.Add(x);
     90        if (p.Value == null) objToRemove.Add(x);
    9191      }, token[Constants.StaticParameters]);
    9292      foreach (var x in objToRemove) x.Remove();
Note: See TracChangeset for help on using the changeset viewer.