/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IContainer_MM06 connectedContainersCasted = item.As <IContainer_MM06>(); if ((connectedContainersCasted != null)) { this._parent.ConnectedContainers.Add(connectedContainersCasted); } }
/// <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) { IContainer_MM06 container_MM06Item = item.As <IContainer_MM06>(); if (((container_MM06Item != null) && this._parent.ConnectedContainers.Remove(container_MM06Item))) { 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.Assembly == null)) { IAssemblyContext assemblyCasted = item.As <IAssemblyContext>(); if ((assemblyCasted != null)) { this._parent.Assembly = assemblyCasted; return; } } if ((this._parent.Container == null)) { IContainer_MM06 containerCasted = item.As <IContainer_MM06>(); if ((containerCasted != null)) { this._parent.Container = containerCasted; return; } } }