/// <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) { if ((this._parent.LoadArea == item)) { this._parent.LoadArea = null; return(true); } ILoadGroup loadGroupItem = item.As <ILoadGroup>(); if (((loadGroupItem != null) && this._parent.LoadGroups.Remove(loadGroupItem))) { 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.LoadArea == null)) { ILoadArea loadAreaCasted = item.As <ILoadArea>(); if ((loadAreaCasted != null)) { this._parent.LoadArea = loadAreaCasted; return; } } ILoadGroup loadGroupsCasted = item.As <ILoadGroup>(); if ((loadGroupsCasted != null)) { this._parent.LoadGroups.Add(loadGroupsCasted); } }