Changeset 17828 for branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonTemplateInstantiator.cs
- Timestamp:
- 02/01/21 14:37:18 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonTemplateInstantiator.cs
r17560 r17828 1 using System.Collections.Generic; 1 using System; 2 using System.Collections.Generic; 2 3 using System.IO; 3 4 using System.Linq; … … 66 67 IJsonItem rootItem = Objects.First().Value; 67 68 68 //TODO validate 69 // validation 70 ValidationResult validationResult = rootItem.GetValidator().Validate(); 71 if (!validationResult.Success) 72 throw validationResult.GenerateException(); 69 73 70 74 // inject configuration … … 105 109 if (Objects.TryGetValue(path, out IJsonItem param)) { 106 110 // remove fixed template parameter from config => dont allow to copy them from concrete config 111 // TODO: shift this into JsonItems? 107 112 obj.Property(nameof(IIntervalRestrictedJsonItem<int>.Minimum))?.Remove(); 108 113 obj.Property(nameof(IIntervalRestrictedJsonItem<int>.Maximum))?.Remove(); 109 114 obj.Property(nameof(IConcreteRestrictedJsonItem<string>.ConcreteRestrictedItems))?.Remove(); 115 obj.Property(nameof(IMatrixJsonItem.ColumnsResizable))?.Remove(); 116 obj.Property(nameof(IMatrixJsonItem.RowsResizable))?.Remove(); 117 obj.Property(nameof(IArrayJsonItem.Resizable))?.Remove(); 110 118 // merge 111 119 param.SetJObject(obj);
Note: See TracChangeset
for help on using the changeset viewer.