source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Converters/ParameterBaseConverter.cs @ 17281

Last change on this file since 17281 was 17281, checked in by dpiringe, 3 years ago

#3026: renamed Transformers -> ...Transformer to ...Converter, ITypeTransformer to IJsonItemConverter, Transformer to JsonItemConverter

File size: 1.0 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6using HeuristicLab.Core;
7
8namespace HeuristicLab.Manufacture {
9  public abstract class ParameterBaseConverter : BaseConverter {
10    public override Component ExtractData(IItem value) {
11      IParameter param = value.Cast<IParameter>();
12      Component comp = ExtractData(param);
13      //comp.Path = value.Cast<IParameter>().ActualValue?.ItemName;
14      /*comp.Path = value.Cast<IParameter>().Name + "." + comp.Path;
15      if(comp.ParameterizedItems != null) {
16        foreach (var item in comp.ParameterizedItems) {
17          item.Path = value.Cast<IParameter>().Name + "." + item.Path;
18        }
19      }*/
20      return comp;
21    }
22    public abstract Component ExtractData(IParameter value);
23
24    public override void InjectData(IItem item, Component data) => InjectData(item.Cast<IParameter>(), data);
25
26    public abstract void InjectData(IParameter parameter, Component data);
27  }
28}
Note: See TracBrowser for help on using the repository browser.