Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/01/21 14:37:18 (4 years ago)
Author:
dpiringe
Message:

#3026

  • removed the option to set the value for JsonItems via exporter
    • reworked some base controls
    • added new controls for JsonItem specific properties (e.g. ArrayResizable)
    • deleted a lot of obsolet controls
  • removed the Enable checkbox in the detail view of JsonItems
  • exporter now clones the IOptimizer object
  • added a check + message for unsupported exports
  • list of JsonItems now includes unsupported JsonItems (disabled and marked with 'unsupported')
  • refactored the converter type check
    • now every converter has to specify its supported type(s)
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;
     1using System.Collections;
     2using System.Collections.Generic;
    23using System.Linq;
    34
    45namespace HeuristicLab.JsonInterface {
     6
    57  public abstract class ConcreteRestrictedValueJsonItem<T> : ValueJsonItem<T>, IConcreteRestrictedJsonItem<T> {
     8
    69    public IEnumerable<T> ConcreteRestrictedItems { get; set; }
    710
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/IntervalRestrictedValueJsonItem.cs

    r17519 r17828  
    2020      if (minProp != null) Minimum = minProp.ToObject<T>();
    2121
    22 
    2322      var maxProp = jObject[nameof(IIntervalRestrictedJsonItem<T>.Maximum)];
    2423      if (maxProp != null) Maximum = maxProp.ToObject<T>();
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs

    r17519 r17828  
    1 using System.Collections;
     1using System;
     2using System.Collections;
    23using System.Collections.Generic;
    34using System.Linq;
     
    2627    public bool Success { get; }
    2728    public IEnumerable<string> Errors { get; }
     29
     30    public Exception GenerateException() =>
     31      new AggregateException(Errors.Select(x => new ArgumentException(x)));
    2832  }
    2933
     
    7680    }
    7781
    78     // TODO jsonIgnore dataType?
    7982    [JsonIgnore]
    8083    public virtual IEnumerable<IJsonItem> Children { get; protected set; }
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/ResultJsonItem.cs

    r17519 r17828  
    22  public class ResultJsonItem : JsonItem, IResultJsonItem {
    33    protected override ValidationResult Validate() => ValidationResult.Successful();
     4
     5    public string Converter { get; set; }
    46  }
    57}
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/UnsupportedJsonItem.cs

    r17519 r17828  
    11using System;
    22using System.Collections.Generic;
     3using System.Linq;
    34using Newtonsoft.Json;
    45
    56namespace HeuristicLab.JsonInterface {
    67  public class UnsupportedJsonItem : JsonItem {
     8    /*
    79    public override string Name {
    810      get => throw new NotSupportedException();
     
    1012    }
    1113
    12     public override string Description {
     14    public override string Description { // TODO
    1315      get => throw new NotSupportedException();
    1416      set => throw new NotSupportedException();
     
    1820      get => throw new NotSupportedException();
    1921    }
     22    */
    2023
    2124    [JsonIgnore]
    2225    public override IEnumerable<IJsonItem> Children {
    23       get => throw new NotSupportedException();
     26      get => Enumerable.Empty<IJsonItem>();
    2427      protected set => throw new NotSupportedException();
    2528    }
    26 
     29    /*
    2730    [JsonIgnore]
    2831    public override IJsonItem Parent {
     
    3033      set => throw new NotSupportedException();
    3134    }
    32 
     35    */
    3336    protected override ValidationResult Validate() => ValidationResult.Successful();
    3437  }
Note: See TracChangeset for help on using the changeset viewer.