/// <summary> /// Fills the node category /// </summary> private void FillCategory() { ConfigCategory cat; foreach (XElement catNode in this.App_Node.Data.Elements()) { cat = new ConfigCategory(catNode.Name.ToString(), this.App_Node); this.Add(cat); } }
/// <summary> /// Adds a new category /// </summary> /// <param name="item">The category to be added</param> public void Add(ConfigCategory item) { this.categories.Add(item.Name, item); }
/// <summary> /// Check if a category is already defined /// </summary> /// <param name="item">The configuration category to be tested</param> /// <returns>True if the configuration category is contained</returns> public bool Contains(ConfigCategory item) { return(this.categories.ContainsKey(item.Name)); }
/// <summary> /// Adds a new category /// </summary> /// <param name="item">The category to be added</param> public void Add(String catName) { ConfigCategory item = new ConfigCategory(catName, this.App_Node); this.categories.Add(catName, item); }