Changeset 18055 for branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonItems/ValueJsonItem.cs
- Timestamp:
- 09/16/21 15:27:07 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/JsonItems/ValueJsonItem.cs
r17519 r18055 1 1 using System; 2 2 using Newtonsoft.Json.Linq; 3 using HEAL.Attic; 3 4 4 5 namespace HeuristicLab.JsonInterface { 6 [StorableType("29139288-7ABB-4391-926E-5975CF38141E")] 5 7 public abstract class ValueJsonItem : JsonItem, IValueJsonItem { 6 8 public object Value { get; set; } … … 10 12 } 11 13 14 public ValueJsonItem() { } 15 16 [StorableConstructor] 17 protected ValueJsonItem(StorableConstructorFlag _) : base(_) { 18 } 19 12 20 } 13 21 22 [StorableType("86085358-50D6-4486-9265-F6CEA8C8FA19")] 14 23 public abstract class ValueJsonItem<T> : ValueJsonItem, IValueJsonItem<T> { 15 24 public new T Value { … … 29 38 30 39 public override void SetJObject(JObject jObject) { 31 if (jObject[nameof(IValueJsonItem<T>.Value)] != null)40 if (jObject[nameof(IValueJsonItem<T>.Value)] != null) 32 41 Value = jObject[nameof(IValueJsonItem<T>.Value)].ToObject<T>(); 33 42 } 43 44 public ValueJsonItem() { } 45 46 [StorableConstructor] 47 protected ValueJsonItem(StorableConstructorFlag _) : base(_) { } 34 48 } 35 49 }
Note: See TracChangeset
for help on using the changeset viewer.