/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { ISubLoadArea subLoadAreasCasted = item.As <ISubLoadArea>(); if ((subLoadAreasCasted != null)) { this._parent.SubLoadAreas.Add(subLoadAreasCasted); } }
/// <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) { ISubLoadArea subLoadAreaItem = item.As <ISubLoadArea>(); if (((subLoadAreaItem != null) && this._parent.SubLoadAreas.Remove(subLoadAreaItem))) { 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.SubLoadArea == null)) { ISubLoadArea subLoadAreaCasted = item.As <ISubLoadArea>(); if ((subLoadAreaCasted != null)) { this._parent.SubLoadArea = subLoadAreaCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IRegisteredLoad registeredLoadsCasted = item.As <IRegisteredLoad>(); if ((registeredLoadsCasted != null)) { this._parent.RegisteredLoads.Add(registeredLoadsCasted); } if ((this._parent.SubLoadArea == null)) { ISubLoadArea subLoadAreaCasted = item.As <ISubLoadArea>(); if ((subLoadAreaCasted != null)) { this._parent.SubLoadArea = subLoadAreaCasted; return; } } }