source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.Manufacture/Converters/StringValueConverter.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: 568 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6using HeuristicLab.Core;
7using HeuristicLab.Data;
8
9namespace HeuristicLab.Manufacture {
10  public class StringValueConverter : BaseConverter {
11    public override void InjectData(IItem item, Component data) =>
12      item.Cast<StringValue>().Value = CastValue<string>(data.Default);
13
14    public override Component ExtractData(IItem value) =>
15      new Component() {
16        Default = value.Cast<StringValue>().Value
17      };
18  }
19}
Note: See TracBrowser for help on using the repository browser.