/// <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) { IParametricResourceDemand parametricResourceDemandItem = item.As <IParametricResourceDemand>(); if (((parametricResourceDemandItem != null) && this._parent.ResourceDemand_Action.Remove(parametricResourceDemandItem))) { return(true); } IInfrastructureCall infrastructureCallItem = item.As <IInfrastructureCall>(); if (((infrastructureCallItem != null) && this._parent.InfrastructureCall__Action.Remove(infrastructureCallItem))) { return(true); } IResourceCall resourceCallItem = item.As <IResourceCall>(); if (((resourceCallItem != null) && this._parent.ResourceCall__Action.Remove(resourceCallItem))) { 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) { IParametricResourceDemand resourceDemand_ActionCasted = item.As <IParametricResourceDemand>(); if ((resourceDemand_ActionCasted != null)) { this._parent.ResourceDemand_Action.Add(resourceDemand_ActionCasted); } IInfrastructureCall infrastructureCall__ActionCasted = item.As <IInfrastructureCall>(); if ((infrastructureCall__ActionCasted != null)) { this._parent.InfrastructureCall__Action.Add(infrastructureCall__ActionCasted); } IResourceCall resourceCall__ActionCasted = item.As <IResourceCall>(); if ((resourceCall__ActionCasted != null)) { this._parent.ResourceCall__Action.Add(resourceCall__ActionCasted); } }