/// <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); } FZI.SoftwareEngineering.DeepModeling.TwoLevelADL.SystemIndependent.IComponent componentItem = item.As <FZI.SoftwareEngineering.DeepModeling.TwoLevelADL.SystemIndependent.IComponent>(); if (((componentItem != null) && this._parent.Components.Remove(componentItem))) { 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) { IInterface interfacesCasted = item.As <IInterface>(); if ((interfacesCasted != null)) { this._parent.Interfaces.Add(interfacesCasted); } FZI.SoftwareEngineering.DeepModeling.TwoLevelADL.SystemIndependent.IComponent componentsCasted = item.As <FZI.SoftwareEngineering.DeepModeling.TwoLevelADL.SystemIndependent.IComponent>(); if ((componentsCasted != null)) { this._parent.Components.Add(componentsCasted); } ISignature availableSignaturesCasted = item.As <ISignature>(); if ((availableSignaturesCasted != null)) { this._parent.AvailableSignatures.Add(availableSignaturesCasted); } }