Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/28/20 14:53:45 (4 years ago)
Author:
dpiringe
Message:

#3026:

  • deleted JsonItemArrayControl and JsonItemDefaultControl
  • redesigned architecture for JsonItem: now there are different types of JsonItem (IntJsonItem, BoolJsonItem, ...) -> for better type safety and expandability
  • fixed bug in BaseConverter for GetMinValue and GetMaxValue for IntValue, but ignored for other value types (DoubleValue, DateTimeValue, ...) because the redesign of JsonItem-Architecture can make these two methods obsolet soon
  • fixed bug in JsonItemConverter to prevent null pointer exceptions
  • refactored value and range converters -> removed complicated generic ValueTypeValueConverter and ValueRangeConverter and implemented the necessary methods directly in concrete classes (improves readability and removes the need of reflection)
  • redesigned view handling in OptimizerIntegration -> dynamically seaches for JsonItemVMBase implementations, which are connected with a view
    • this enables better scaling with more user controls
  • JsonItemVMBase implements MVVM architecture
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/EnumTypeConverter.cs

    r17407 r17410  
    1515      ((dynamic)item).Value = Enum.Parse(
    1616        item.GetType().GenericTypeArguments.First(),
    17         CastValue<string>(data.Value));
     17        ((StringJsonItem)data).Value);
    1818   
    1919    public override IJsonItem Extract(IItem value, IJsonItemConverter root) {
    2020      object val = ((dynamic)value).Value;
    2121      Type enumType = val.GetType();
    22       return new JsonItem() {
     22      return new StringJsonItem() {
    2323        Name = value.ItemName,
    2424        Value = Enum.GetName(enumType, val),
Note: See TracChangeset for help on using the changeset viewer.