Changeset 18055 for branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonItems/ValueLookupJsonItem.cs
- Timestamp:
- 09/16/21 15:27:07 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonItems/ValueLookupJsonItem.cs
r17519 r18055 1 1 using System.Collections.Generic; 2 2 using Newtonsoft.Json.Linq; 3 using HEAL.Attic; 3 4 4 5 namespace HeuristicLab.JsonInterface { 6 [StorableType("D2521F37-3968-4FAC-AEE9-F083AA86C06C")] 5 7 public class ValueLookupJsonItem : LookupJsonItem, IValueLookupJsonItem { 6 8 public IJsonItem ActualValue { get; set; } … … 13 15 public override JObject GenerateJObject() { 14 16 var obj = base.GenerateJObject(); 15 if (ActualValue != null) {17 if (ActualValue != null) { 16 18 obj.Add(nameof(IValueLookupJsonItem.ActualValue), ActualValue.Path); 17 19 } … … 21 23 public override IEnumerator<IJsonItem> GetEnumerator() { 22 24 using (var it = base.GetEnumerator()) { 23 while (it.MoveNext()) {25 while (it.MoveNext()) { 24 26 yield return it.Current; 25 27 } 26 28 } 27 if (ActualValue != null) {29 if (ActualValue != null) { 28 30 using (var it = ActualValue.GetEnumerator()) { 29 31 while (it.MoveNext()) { … … 33 35 } 34 36 } 37 38 public ValueLookupJsonItem() { } 39 40 [StorableConstructor] 41 protected ValueLookupJsonItem(StorableConstructorFlag _) : base(_) { } 35 42 } 36 43 }
Note: See TracChangeset
for help on using the changeset viewer.