/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { INamedElt elemsCasted = item.As <INamedElt>(); if ((elemsCasted != null)) { this._parent.Elems.Add(elemsCasted); } }
/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { INamedElt namedEltItem = item.As <INamedElt>(); if (((namedEltItem != null) && this._parent.Elems.Remove(namedEltItem))) { return(true); } return(false); }