/// <summary> /// The create section. /// </summary> /// <param name="varCollection"> /// The var collection. /// </param> /// <returns> /// The <see cref="NestedAttributeCollection"/>. /// </returns> private NestedAttributeCollection CreateSection(StringCollection varCollection) { var collection = new NestedAttributeCollection(); foreach (var cvar in varCollection) { collection.Add(new NestedAttribute(cvar, new SBString(), cvar)); } return collection; }
/// <summary> /// The refresh collection. /// </summary> /// <param name="collection"> /// The collection. /// </param> public void RefreshCollection(NestedAttributeCollection collection) { }
/// <summary> /// The set item data. /// </summary> /// <param name="value"> /// The value. /// </param> /// <param name="which"> /// The which. /// </param> /// <param name="collection"> /// The collection. /// </param> private static void SetItemData(SBString value, string which, NestedAttributeCollection collection) { if (collection.ContainsIndex(which)) { var item = collection.GetItemWithIndex(which); if (item == null) { collection.Add(new NestedAttribute(which, value, BuildTitle(collection.Variable, which))); } if (item != null) { item.Source = value; } } else if (!string.IsNullOrEmpty(collection.Variable) && collection.Variable.Equals(which)) { collection.Source = value; } else { collection.Add(new NestedAttribute(which, value, BuildTitle(collection.Variable, which))); } }