/// <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) { IInterface interfaceItem = item.As <IInterface>(); if (((interfaceItem != null) && this._parent.Interfaces.Remove(interfaceItem))) { return(true); } IComponent_MM06 component_MM06Item = item.As <IComponent_MM06>(); if (((component_MM06Item != null) && this._parent.Components.Remove(component_MM06Item))) { return(true); } ISignature signatureItem = item.As <ISignature>(); if (((signatureItem != null) && this._parent.AvailableSignatures.Remove(signatureItem))) { return(true); } return(false); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { if ((this._parent.Implements == null)) { IComponent_MM06 implementsCasted = item.As <IComponent_MM06>(); if ((implementsCasted != null)) { this._parent.Implements = implementsCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IInterface interfacesCasted = item.As <IInterface>(); if ((interfacesCasted != null)) { this._parent.Interfaces.Add(interfacesCasted); } IComponent_MM06 componentsCasted = item.As <IComponent_MM06>(); if ((componentsCasted != null)) { this._parent.Components.Add(componentsCasted); } ISignature availableSignaturesCasted = item.As <ISignature>(); if ((availableSignaturesCasted != null)) { this._parent.AvailableSignatures.Add(availableSignaturesCasted); } }