/// <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.Passiveresource_AcquireAction == null)) { IPassiveResource passiveresource_AcquireActionCasted = item.As <IPassiveResource>(); if ((passiveresource_AcquireActionCasted != null)) { this._parent.Passiveresource_AcquireAction = passiveresource_AcquireActionCasted; return; } } }
/// <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.PassiveResource__ResourceTimeoutFailureType == null)) { IPassiveResource passiveResource__ResourceTimeoutFailureTypeCasted = item.As <IPassiveResource>(); if ((passiveResource__ResourceTimeoutFailureTypeCasted != null)) { this._parent.PassiveResource__ResourceTimeoutFailureType = passiveResource__ResourceTimeoutFailureTypeCasted; return; } } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IServiceEffectSpecification serviceEffectSpecifications__BasicComponentCasted = item.As <IServiceEffectSpecification>(); if ((serviceEffectSpecifications__BasicComponentCasted != null)) { this._parent.ServiceEffectSpecifications__BasicComponent.Add(serviceEffectSpecifications__BasicComponentCasted); } IPassiveResource passiveResource_BasicComponentCasted = item.As <IPassiveResource>(); if ((passiveResource_BasicComponentCasted != null)) { this._parent.PassiveResource_BasicComponent.Add(passiveResource_BasicComponentCasted); } }
/// <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) { IServiceEffectSpecification serviceEffectSpecificationItem = item.As <IServiceEffectSpecification>(); if (((serviceEffectSpecificationItem != null) && this._parent.ServiceEffectSpecifications__BasicComponent.Remove(serviceEffectSpecificationItem))) { return(true); } IPassiveResource passiveResourceItem = item.As <IPassiveResource>(); if (((passiveResourceItem != null) && this._parent.PassiveResource_BasicComponent.Remove(passiveResourceItem))) { return(true); } return(false); }