Changeset 17483 for branches/3026_IntegrationIntoSymSpace
- Timestamp:
- 03/23/20 11:58:38 (5 years ago)
- Location:
- branches/3026_IntegrationIntoSymSpace
- Files:
-
- 1 added
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ConstrainedValueParameterConverter.cs
r17477 r17483 21 21 if (parameter.ActualValue != null && parameter.ActualValue is IParameterizedItem && cdata.Children != null) { 22 22 foreach(var child in cdata.Children) { 23 if(child.Name == parameter.ActualValue.ItemName) // name kann verändert werden? egal da bei inject der original name vorhanden ist23 if(child.Name == cdata.Value || child.Path.EndsWith(cdata.Value)) 24 24 root.Inject(parameter.ActualValue, child, root); 25 25 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/StringValueConverter.cs
r17473 r17483 17 17 public override IJsonItem Extract(IItem value, IJsonItemConverter root) => 18 18 new StringJsonItem() { 19 //Name = "[OverridableParamName]",20 19 Name = value.ItemName, 21 20 Description = value.ItemDescription, -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueLookupParameterConverter.cs
r17477 r17483 22 22 IValueLookupParameter param = value as IValueLookupParameter; 23 23 24 IValueLookupJsonItem item = new ValueLookupJsonItem() {};24 IValueLookupJsonItem item = new ValueLookupJsonItem(); 25 25 26 26 if (param.Value != null) { 27 27 IJsonItem tmp = root.Extract(param.Value, root); 28 28 tmp.Parent = item; 29 //item.AddChildren(tmp.Children);30 29 item.ActualValue = tmp; 31 30 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueParameterConverter.cs
r17473 r17483 21 21 root.Inject(parameter.ActualValue, data, root); 22 22 else 23 root.Inject(parameter.ActualValue, /*data.Children?.First()*/data, root);23 root.Inject(parameter.ActualValue, data, root); 24 24 25 25 } … … 40 40 tmp.Description = parameter.Description; 41 41 item = tmp; 42 /*43 if (tmp.Name == "[OverridableParamName]") {44 tmp.Name = parameter.Name;45 tmp.Description = parameter.Description;46 item = tmp;47 //JsonItem.Merge(item as JsonItem, tmp as JsonItem);48 } else49 item.AddChildren(tmp);50 */51 42 } 52 43 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueRangeConverter.cs
r17473 r17483 25 25 IntRange range = value as IntRange; 26 26 return new IntRangeJsonItem() { 27 //Name = "[OverridableParamName]",28 27 Name = value.ItemName, 29 28 Description = value.ItemDescription, … … 50 49 DoubleRange range = value as DoubleRange; 51 50 return new DoubleRangeJsonItem() { 52 //Name = "[OverridableParamName]",53 51 Name = value.ItemName, 54 52 Description = value.ItemDescription, -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueTypeMatrixConverter.cs
r17473 r17483 20 20 public override IJsonItem Extract(IItem value, IJsonItemConverter root) => 21 21 new IntMatrixJsonItem() { 22 Name = "[OverridableParamName]",22 Name = value.ItemName, 23 23 Description = value.ItemDescription, 24 24 Value = Transform((IntMatrix)value), … … 40 40 public override IJsonItem Extract(IItem value, IJsonItemConverter root) => 41 41 new DoubleMatrixJsonItem() { 42 Name = "[OverridableParamName]",42 Name = value.ItemName, 43 43 Description = value.ItemDescription, 44 44 Value = Transform((DoubleMatrix)value), … … 62 62 public override IJsonItem Extract(IItem value, IJsonItemConverter root) => 63 63 new DoubleMatrixJsonItem() { 64 Name = "[OverridableParamName]",64 Name = value.ItemName, 65 65 Description = value.ItemDescription, 66 66 Value = Transform((PercentMatrix)value), … … 82 82 public override IJsonItem Extract(IItem value, IJsonItemConverter root) => 83 83 new BoolMatrixJsonItem() { 84 //Name = "[OverridableParamName]",85 84 Name = value.ItemName, 86 85 Description = value.ItemDescription, -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/ValueTypeValueConverter.cs
r17473 r17483 18 18 public override IJsonItem Extract(IItem value, IJsonItemConverter root) => 19 19 new IntJsonItem() { 20 //Name = "[OverridableParamName]",21 20 Name = value.ItemName, 22 21 Description = value.ItemDescription, … … 36 35 public override IJsonItem Extract(IItem value, IJsonItemConverter root) => 37 36 new DoubleJsonItem() { 38 //Name = "[OverridableParamName]",39 37 Name = value.ItemName, 40 38 Description = value.ItemDescription, … … 54 52 public override IJsonItem Extract(IItem value, IJsonItemConverter root) => 55 53 new DoubleJsonItem() { 56 //Name = "[OverridableParamName]",57 54 Name = value.ItemName, 58 55 Description = value.ItemDescription, 59 56 Value = ((PercentValue)value).Value, 60 Minimum = double.MinValue,61 Maximum = double.MaxValue57 Minimum = 0.0d, 58 Maximum = 1.0d 62 59 }; 63 60 } … … 72 69 public override IJsonItem Extract(IItem value, IJsonItemConverter root) => 73 70 new BoolJsonItem() { 74 //Name = "[OverridableParamName]",75 71 Name = value.ItemName, 76 72 Description = value.ItemDescription, … … 88 84 public override IJsonItem Extract(IItem value, IJsonItemConverter root) => 89 85 new DateTimeJsonItem() { 90 //Name = "[OverridableParamName]",91 86 Name = value.ItemName, 92 87 Description = value.ItemDescription, -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/HeuristicLab.JsonInterface.csproj
r17478 r17483 61 61 </ItemGroup> 62 62 <ItemGroup> 63 <Compile Include="AdvancedTypeComparer.cs" />64 63 <Compile Include="Constants.cs" /> 65 64 <Compile Include="Converters\AlgorithmConverter.cs" /> … … 166 165 </ProjectReference> 167 166 </ItemGroup> 168 <ItemGroup> 169 <Folder Include="Extensions\" /> 170 </ItemGroup> 167 <ItemGroup /> 171 168 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> 172 169 <PropertyGroup> -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonItemConverter.cs
r17478 r17483 93 93 94 94 private bool CompareGenericTypes(Type t1, Type t2) => 95 (t1.IsGenericType && t1.GetGenericTypeDefinition() == t2) ||96 (t2.IsGenericType && t2.GetGenericTypeDefinition() == t1) ;95 (t1.IsGenericType && t1.GetGenericTypeDefinition() == t2) /*|| 96 (t2.IsGenericType && t2.GetGenericTypeDefinition() == t1)*/; 97 97 98 98 private bool CompareTypes(Type t1, Type t2) => 99 t1 == t2 || t1.IsAssignableFrom(t2) ||99 t1 == t2 || /*t1.IsAssignableFrom(t2) ||*/ 100 100 t1.GetInterfaces().Any( 101 101 i => i == t2 || CompareGenericTypes(i, t2) -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonTemplateInstantiator.cs
r17481 r17483 110 110 // override default value 111 111 if (Objects.TryGetValue(path, out IJsonItem param)) { 112 // remove fixed template parameter => dont allow to copy them from concrete config112 // remove fixed template parameter from config => dont allow to copy them from concrete config 113 113 obj.Property(nameof(IIntervalRestrictedJsonItem<int>.Minimum))?.Remove(); 114 114 obj.Property(nameof(IIntervalRestrictedJsonItem<int>.Maximum))?.Remove(); -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ValueLookupJsonItem.cs
r17481 r17483 9 9 namespace HeuristicLab.JsonInterface { 10 10 public class ValueLookupJsonItem : LookupJsonItem, IValueLookupJsonItem { 11 12 11 public IJsonItem ActualValue { get; set; } 13 12 … … 20 19 var obj = base.GenerateJObject(); 21 20 if(ActualValue != null) { 22 var actualValue = ActualValue.GenerateJObject(); 23 obj.Add(nameof(IValueLookupJsonItem.ActualValue), actualValue); 21 obj.Add(nameof(IValueLookupJsonItem.ActualValue), ActualValue.Path); 24 22 } 25 23 return obj; -
branches/3026_IntegrationIntoSymSpace/Heuristiclab.ConfigStarter/Program.cs
r17477 r17483 24 24 var pluginManager = new PluginManager(pluginPath); 25 25 pluginManager.DiscoverAndCheckPlugins(); 26 27 26 } catch(Exception e) { 28 27 Console.WriteLine(e);
Note: See TracChangeset
for help on using the changeset viewer.