Last change
on this file since 17284 was
17284,
checked in by dpiringe, 5 years ago
|
#3026: renamed namespace and project from HeuristicLab.Manufacture to HeuristicLab.JsonInterface
|
File size:
567 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Threading.Tasks;
|
---|
6 | using HeuristicLab.Core;
|
---|
7 | using HeuristicLab.Data;
|
---|
8 |
|
---|
9 | namespace HeuristicLab.JsonInterface {
|
---|
10 | public class StringValueConverter : BaseConverter {
|
---|
11 | public override void InjectData(IItem item, JsonItem data) =>
|
---|
12 | item.Cast<StringValue>().Value = CastValue<string>(data.Default);
|
---|
13 |
|
---|
14 | public override JsonItem ExtractData(IItem value) =>
|
---|
15 | new JsonItem() {
|
---|
16 | Default = value.Cast<StringValue>().Value
|
---|
17 | };
|
---|
18 | }
|
---|
19 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.