Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/20/20 16:58:03 (5 years ago)
Author:
dpiringe
Message:

#3026:

  • made interfaces for array/matrix JsonItems and for their VMs aswell (IArrayJsonItem, IArrayJsonItemVM, IMatrixJsonItem, IMatrixJsonItemVM), incl. base classes (ArrayJsonItemBase, ArrayValueVM, MatrixJsonItemBase, MatrixValueVM)
  • changed inheritance structure for already existing array/matrix JsonItems -> they inherit now from new base array/matrix base classes
  • added input elements to configure the size of an matrix or array in JsonItemMultiValueControl (incl. VM binding and validation)
  • splitted file JsonItems.cs into separate files for their corresponding types (IntJsonItems.cs, DoubleJsonItems.cs, BoolJsonItems.cs, StringJsonItem.cs, DateTimeJsonItem.cs)
  • changed location of deserialization of json values from JsonTemplateInstantiator into IJsonItem (implemented in JsonItem and set to virtual, overridden in MatrixJsonItemBase and ArrayJsonItemBase)
  • added new CLI argument StringArgument
  • some little UI improvements (location fixes, anchor fixes, ...)
Location:
branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models
Files:
7 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Models/JsonItem.cs

    r17444 r17446  
    55using System.Text;
    66using Newtonsoft.Json;
     7using Newtonsoft.Json.Linq;
    78
    89namespace HeuristicLab.JsonInterface {
     
    114115    public void FixatePath() => fixedPath = Path;
    115116    public void LoosenPath() => fixedPath = "";
     117
     118    public virtual void SetFromJObject(JObject jObject) {
     119      Value = jObject[nameof(IJsonItem.Value)]?.ToObject<object>();
     120      Range = jObject[nameof(IJsonItem.Range)]?.ToObject<object[]>();
     121      ActualName = jObject[nameof(IJsonItem.ActualName)]?.ToString();
     122    }
    116123    #endregion
    117124
Note: See TracChangeset for help on using the changeset viewer.