Changeset 17473 for branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueLookupParameterConverter.cs
- Timestamp:
- 03/10/20 17:17:37 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueLookupParameterConverter.cs
r17471 r17473 13 13 public override void Inject(IItem item, IJsonItem data, IJsonItemConverter root) { 14 14 IValueLookupParameter param = item as IValueLookupParameter; 15 param.ActualName = CastValue<string>(((IValueLookupJsonItem)data).ActualName); 15 IValueLookupJsonItem lookupItem = data as IValueLookupJsonItem; 16 param.ActualName = lookupItem.ActualName; 16 17 if (param.Value != null) 17 root.Inject(param.Value, data, root);18 root.Inject(param.Value, lookupItem.JsonItemReference, root); 18 19 } 19 20 … … 25 26 if (param.Value != null) { 26 27 IJsonItem tmp = root.Extract(param.Value, root); 27 item.Value = tmp.Value;28 item.Range = tmp.Range;29 item.Name = tmp.Name;30 item.Description = tmp.Description;31 28 item.AddChildren(tmp.Children); 32 item.Active = tmp.Active;33 29 item.JsonItemReference = tmp; 34 } else {35 var min = GetMinValue(param.DataType);36 var max = GetMaxValue(param.DataType);37 if (min != null && max != null)38 item.Range = new object[] { min, max };39 else40 item.Range = null;41 30 } 42 31 item.Name = param.Name;
Note: See TracChangeset
for help on using the changeset viewer.