- Timestamp:
- 02/01/21 14:37:18 (4 years ago)
- Location:
- branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ConcreteRestrictedValueJsonItem.cs
r17519 r17828 1 using System.Collections.Generic; 1 using System.Collections; 2 using System.Collections.Generic; 2 3 using System.Linq; 3 4 4 5 namespace HeuristicLab.JsonInterface { 6 5 7 public abstract class ConcreteRestrictedValueJsonItem<T> : ValueJsonItem<T>, IConcreteRestrictedJsonItem<T> { 8 6 9 public IEnumerable<T> ConcreteRestrictedItems { get; set; } 7 10 -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntervalRestrictedValueJsonItem.cs
r17519 r17828 20 20 if (minProp != null) Minimum = minProp.ToObject<T>(); 21 21 22 23 22 var maxProp = jObject[nameof(IIntervalRestrictedJsonItem<T>.Maximum)]; 24 23 if (maxProp != null) Maximum = maxProp.ToObject<T>(); -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs
r17519 r17828 1 using System.Collections; 1 using System; 2 using System.Collections; 2 3 using System.Collections.Generic; 3 4 using System.Linq; … … 26 27 public bool Success { get; } 27 28 public IEnumerable<string> Errors { get; } 29 30 public Exception GenerateException() => 31 new AggregateException(Errors.Select(x => new ArgumentException(x))); 28 32 } 29 33 … … 76 80 } 77 81 78 // TODO jsonIgnore dataType?79 82 [JsonIgnore] 80 83 public virtual IEnumerable<IJsonItem> Children { get; protected set; } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ResultJsonItem.cs
r17519 r17828 2 2 public class ResultJsonItem : JsonItem, IResultJsonItem { 3 3 protected override ValidationResult Validate() => ValidationResult.Successful(); 4 5 public string Converter { get; set; } 4 6 } 5 7 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/UnsupportedJsonItem.cs
r17519 r17828 1 1 using System; 2 2 using System.Collections.Generic; 3 using System.Linq; 3 4 using Newtonsoft.Json; 4 5 5 6 namespace HeuristicLab.JsonInterface { 6 7 public class UnsupportedJsonItem : JsonItem { 8 /* 7 9 public override string Name { 8 10 get => throw new NotSupportedException(); … … 10 12 } 11 13 12 public override string Description { 14 public override string Description { // TODO 13 15 get => throw new NotSupportedException(); 14 16 set => throw new NotSupportedException(); … … 18 20 get => throw new NotSupportedException(); 19 21 } 22 */ 20 23 21 24 [JsonIgnore] 22 25 public override IEnumerable<IJsonItem> Children { 23 get => throw new NotSupportedException();26 get => Enumerable.Empty<IJsonItem>(); 24 27 protected set => throw new NotSupportedException(); 25 28 } 26 29 /* 27 30 [JsonIgnore] 28 31 public override IJsonItem Parent { … … 30 33 set => throw new NotSupportedException(); 31 34 } 32 35 */ 33 36 protected override ValidationResult Validate() => ValidationResult.Successful(); 34 37 }
Note: See TracChangeset
for help on using the changeset viewer.