- Timestamp:
- 03/09/20 10:36:09 (5 years ago)
- Location:
- branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models
- Files:
-
- 2 added
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/DoubleJsonItems.cs
r17451 r17471 23 23 } 24 24 } 25 26 public class DoubleNamedMatrixJsonItem : NamedMatrixJsonItemBase<double> {27 protected override bool IsInRange() {28 for (int c = 0; c < Value.Length; ++c) {29 for (int r = 0; r < Value[c].Length; ++r) {30 if (Value[c][r] < Range.First() && Range.Last() < Value[c][r])31 return false;32 }33 }34 return true;35 }36 }37 25 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntJsonItems.cs
r17454 r17471 7 7 namespace HeuristicLab.JsonInterface { 8 8 public class IntJsonItem : JsonItem<int> { 9 //public new IEnumerable<int> Range { get; } 9 10 /* 10 11 public int MinValue { get; set; } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs
r17451 r17471 66 66 public virtual IEnumerable<object> Range { get; set; } 67 67 68 // TODO eigene items für LookUp?69 public virtual string ActualName { get; set; }70 71 68 // TODO jsonIgnore dataType? 72 69 … … 110 107 Value = jObject[nameof(IJsonItem.Value)]?.ToObject<object>(); 111 108 Range = jObject[nameof(IJsonItem.Range)]?.ToObject<object[]>(); 112 ActualName = jObject[nameof(IJsonItem.ActualName)]?.ToString();113 109 } 114 110 #endregion … … 118 114 * TODO protected abstract bool Validate(); 119 115 */ 120 116 121 117 protected virtual bool IsInRange() { 122 118 bool b1 = true, b2 = true; -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/MatrixJsonItemBase.cs
r17446 r17471 11 11 public virtual bool ColumnsResizable { get; set; } 12 12 13 IList<string> rows = new List<string>(); 14 public IEnumerable<string> RowNames { 15 get => rows; 16 set => rows = new List<string>(value); 17 } 18 19 IList<string> cols = new List<string>(); 20 public IEnumerable<string> ColumnNames { 21 get => cols; 22 set => cols = new List<string>(value); 23 } 24 13 25 public override void SetFromJObject(JObject jObject) { 14 26 base.SetFromJObject(jObject); 15 27 RowsResizable = (jObject[nameof(IMatrixJsonItem.RowsResizable)]?.ToObject<bool>()).GetValueOrDefault(); 16 28 ColumnsResizable = (jObject[nameof(IMatrixJsonItem.ColumnsResizable)]?.ToObject<bool>()).GetValueOrDefault(); 29 RowNames = jObject[nameof(IMatrixJsonItem.RowNames)]?.ToObject<IEnumerable<string>>(); 30 ColumnNames = jObject[nameof(IMatrixJsonItem.ColumnNames)]?.ToObject<IEnumerable<string>>(); 17 31 } 18 32 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ResultJsonItem.cs
r17451 r17471 6 6 7 7 namespace HeuristicLab.JsonInterface { 8 public class ResultJsonItem : JsonItem {8 public class ResultJsonItem : JsonItem, IResultJsonItem { 9 9 10 10 } -
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/UnsupportedJsonItem.cs
r17433 r17471 43 43 set => throw new NotSupportedException(); 44 44 } 45 46 public override string ActualName {47 get => throw new NotSupportedException();48 set => throw new NotSupportedException();49 }50 45 } 51 46 }
Note: See TracChangeset
for help on using the changeset viewer.