Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/StringValueConverter.cs @ 17284

Last change on this file since 17284 was 17284, checked in by dpiringe, 4 years ago

#3026: renamed namespace and project from HeuristicLab.Manufacture to HeuristicLab.JsonInterface

File size: 567 bytes
RevLine 
[17263]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6using HeuristicLab.Core;
7using HeuristicLab.Data;
8
[17284]9namespace HeuristicLab.JsonInterface {
[17281]10  public class StringValueConverter : BaseConverter {
[17283]11    public override void InjectData(IItem item, JsonItem data) =>
[17263]12      item.Cast<StringValue>().Value = CastValue<string>(data.Default);
13
[17283]14    public override JsonItem ExtractData(IItem value) =>
15      new JsonItem() {
[17266]16        Default = value.Cast<StringValue>().Value
17      };
[17263]18  }
19}
Note: See TracBrowser for help on using the repository browser.