public CategorySchemeMutableObjectBaseCore( ICategorySchemeObjectBase categoryScheme) : base(categoryScheme) { this.categories = new List<ICategoryMutableObjectBase>(); if (categoryScheme.Categories != null) { /* foreach */ foreach (ICategoryObjectBase Icurrent in categoryScheme.Categories) { categories.Add(new CategoryMutableObjectBaseCore(this, Icurrent, null)); } } }
/// <summary> /// Remove the given ICategorySchemeObjectBase from this container, do nothing if it is not in this container /// </summary> /// <param name="categorySchemeObject">CategoryScheme Object </param> public void RemoveCategoryScheme(ICategorySchemeObjectBase categorySchemeObject) { this._categorySchemes.Remove(categorySchemeObject); }
/// <summary> /// Add a ICategorySchemeObjectBase to this container, overwrite if one already exists with the same URN /// </summary> /// <param name="categorySchemeObject">The object. </param> public void AddCategoryScheme(ICategorySchemeObjectBase categorySchemeObject) { if(categorySchemeObject != null) { this._categorySchemes.Remove(categorySchemeObject); this._categorySchemes.Add(categorySchemeObject); } }