/// <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) { IProvidedRole providedRoleItem = item.As <IProvidedRole>(); if (((providedRoleItem != null) && this._parent.ProvidedRoles_InterfaceProvidingEntity.Remove(providedRoleItem))) { return(true); } IRequiredRole requiredRoleItem = item.As <IRequiredRole>(); if (((requiredRoleItem != null) && this._parent.RequiredRoles_InterfaceRequiringEntity.Remove(requiredRoleItem))) { return(true); } IResourceRequiredRole resourceRequiredRoleItem = item.As <IResourceRequiredRole>(); if (((resourceRequiredRoleItem != null) && this._parent.ResourceRequiredRoles__ResourceInterfaceRequiringEntity.Remove(resourceRequiredRoleItem))) { 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) { IProvidedRole providedRoles_InterfaceProvidingEntityCasted = item.As <IProvidedRole>(); if ((providedRoles_InterfaceProvidingEntityCasted != null)) { this._parent.ProvidedRoles_InterfaceProvidingEntity.Add(providedRoles_InterfaceProvidingEntityCasted); } }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IProvidedRole providedRoles_InterfaceProvidingEntityCasted = item.As <IProvidedRole>(); if ((providedRoles_InterfaceProvidingEntityCasted != null)) { this._parent.ProvidedRoles_InterfaceProvidingEntity.Add(providedRoles_InterfaceProvidingEntityCasted); } IRequiredRole requiredRoles_InterfaceRequiringEntityCasted = item.As <IRequiredRole>(); if ((requiredRoles_InterfaceRequiringEntityCasted != null)) { this._parent.RequiredRoles_InterfaceRequiringEntity.Add(requiredRoles_InterfaceRequiringEntityCasted); } IResourceRequiredRole resourceRequiredRoles__ResourceInterfaceRequiringEntityCasted = item.As <IResourceRequiredRole>(); if ((resourceRequiredRoles__ResourceInterfaceRequiringEntityCasted != null)) { this._parent.ResourceRequiredRoles__ResourceInterfaceRequiringEntity.Add(resourceRequiredRoles__ResourceInterfaceRequiringEntityCasted); } }