/// <summary> /// Adds an item for an object - with a dictionary of KeyValue pairs. /// </summary> /// <param name="name">The name of this item.</param> /// <param name="value">The value in this item.</param> public ABSaveParserItem(ABSaveObjectItems items) { // This constructor is for an object, so make it an object. ItemType = ABSaveParserItemType.Object; // Make the ObjectItems a new dictionary with all the items in it. ObjectItems = items; // Since this is an object, the rest isn't needed. InnerItems = null; ActualDictionary = null; }
/// <summary> /// Sets this item as an array, with a certain item type. /// </summary> /// <param name="items">Items to add at the beginning.</param> public ABSaveParserItem(List <TInnerType> items) { // This constructor is for an array, so make it an array. ItemType = ABSaveParserItemType.Array; // Now, create a new instance of the InnerItems list. InnerItems = new List <TInnerType>(items); // Since this is an array, the rest isn't needed. ObjectItems = null; ActualDictionary = null; }