public EditorList(EditorSession session, TypeInformation elementType, JToken json) { Session = session; ElementType = elementType; this.json = json; Elements = new List <IEditorValue>(); foreach (var element in json) { Elements.Add(Session.CreateValue(elementType, null, element)); } }
public EditorDictionary(EditorSession session, TypeInformation valueType, JToken json) { Session = session; ValueType = valueType; this.json = json; KeyValuePairs = new Dictionary <string, EditorKeyValuePair>(); if (json.Type != JTokenType.Null) { var jsonObject = (JObject)json; foreach (var kvp in jsonObject.Properties()) { var value = new EditorKeyValuePair(Session, ValueType, kvp); KeyValuePairs.Add(kvp.Name, value); } } }