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:
1.0 KB
|
Rev | Line | |
---|
[17263] | 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 |
|
---|
[17284] | 8 | namespace HeuristicLab.JsonInterface {
|
---|
[17281] | 9 | public abstract class ParameterBaseConverter : BaseConverter {
|
---|
[17283] | 10 | public override JsonItem ExtractData(IItem value) {
|
---|
[17280] | 11 | IParameter param = value.Cast<IParameter>();
|
---|
[17283] | 12 | JsonItem comp = ExtractData(param);
|
---|
[17280] | 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 | }
|
---|
[17283] | 22 | public abstract JsonItem ExtractData(IParameter value);
|
---|
[17263] | 23 |
|
---|
[17283] | 24 | public override void InjectData(IItem item, JsonItem data) => InjectData(item.Cast<IParameter>(), data);
|
---|
[17263] | 25 |
|
---|
[17283] | 26 | public abstract void InjectData(IParameter parameter, JsonItem data);
|
---|
[17263] | 27 | }
|
---|
| 28 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.