Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/16/21 15:27:07 (3 years ago)
Author:
dpiringe
Message:

#3026

  • added StorableTypeAttribute and StorableConstructorAttribute to all JsonItems
  • added a new JsonItem ListJsonItem + Interfaces IListJsonItem
  • renamed SymRegPythonProcessor to RunCollectionSRSolutionPythonFormatter
  • removed Interface IResultCollectionProcessor -> using the interface IRunCollectionModifier now (has aleady implementations)
  • renamed all related variables/fields/properties with a connection to ResultCollectionProcessor
  • added new implementations for IRunCollectionModifier
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonItems/ValueLookupJsonItem.cs

    r17519 r18055  
    11using System.Collections.Generic;
    22using Newtonsoft.Json.Linq;
     3using HEAL.Attic;
    34
    45namespace HeuristicLab.JsonInterface {
     6  [StorableType("D2521F37-3968-4FAC-AEE9-F083AA86C06C")]
    57  public class ValueLookupJsonItem : LookupJsonItem, IValueLookupJsonItem {
    68    public IJsonItem ActualValue { get; set; }
     
    1315    public override JObject GenerateJObject() {
    1416      var obj = base.GenerateJObject();
    15       if(ActualValue != null) {
     17      if (ActualValue != null) {
    1618        obj.Add(nameof(IValueLookupJsonItem.ActualValue), ActualValue.Path);
    1719      }
     
    2123    public override IEnumerator<IJsonItem> GetEnumerator() {
    2224      using (var it = base.GetEnumerator()) {
    23         while(it.MoveNext()) {
     25        while (it.MoveNext()) {
    2426          yield return it.Current;
    2527        }
    2628      }
    27       if(ActualValue != null) {
     29      if (ActualValue != null) {
    2830        using (var it = ActualValue.GetEnumerator()) {
    2931          while (it.MoveNext()) {
     
    3335      }
    3436    }
     37
     38    public ValueLookupJsonItem() { }
     39
     40    [StorableConstructor]
     41    protected ValueLookupJsonItem(StorableConstructorFlag _) : base(_) { }
    3542  }
    3643}
Note: See TracChangeset for help on using the changeset viewer.