/// <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.InnerRequiredRole_RequiredDelegationConnector == null)) { IOperationRequiredRole innerRequiredRole_RequiredDelegationConnectorCasted = item.As <IOperationRequiredRole>(); if ((innerRequiredRole_RequiredDelegationConnectorCasted != null)) { this._parent.InnerRequiredRole_RequiredDelegationConnector = innerRequiredRole_RequiredDelegationConnectorCasted; return; } } if ((this._parent.OuterRequiredRole_RequiredDelegationConnector == null)) { IOperationRequiredRole outerRequiredRole_RequiredDelegationConnectorCasted = item.As <IOperationRequiredRole>(); if ((outerRequiredRole_RequiredDelegationConnectorCasted != null)) { this._parent.OuterRequiredRole_RequiredDelegationConnector = outerRequiredRole_RequiredDelegationConnectorCasted; return; } } if ((this._parent.AssemblyContext_RequiredDelegationConnector == null)) { IAssemblyContext assemblyContext_RequiredDelegationConnectorCasted = item.As <IAssemblyContext>(); if ((assemblyContext_RequiredDelegationConnectorCasted != null)) { this._parent.AssemblyContext_RequiredDelegationConnector = assemblyContext_RequiredDelegationConnectorCasted; 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.RequiringAssemblyContext_AssemblyConnector == null)) { IAssemblyContext requiringAssemblyContext_AssemblyConnectorCasted = item.As <IAssemblyContext>(); if ((requiringAssemblyContext_AssemblyConnectorCasted != null)) { this._parent.RequiringAssemblyContext_AssemblyConnector = requiringAssemblyContext_AssemblyConnectorCasted; return; } } if ((this._parent.ProvidingAssemblyContext_AssemblyConnector == null)) { IAssemblyContext providingAssemblyContext_AssemblyConnectorCasted = item.As <IAssemblyContext>(); if ((providingAssemblyContext_AssemblyConnectorCasted != null)) { this._parent.ProvidingAssemblyContext_AssemblyConnector = providingAssemblyContext_AssemblyConnectorCasted; return; } } if ((this._parent.ProvidedRole_AssemblyConnector == null)) { IOperationProvidedRole providedRole_AssemblyConnectorCasted = item.As <IOperationProvidedRole>(); if ((providedRole_AssemblyConnectorCasted != null)) { this._parent.ProvidedRole_AssemblyConnector = providedRole_AssemblyConnectorCasted; return; } } if ((this._parent.RequiredRole_AssemblyConnector == null)) { IOperationRequiredRole requiredRole_AssemblyConnectorCasted = item.As <IOperationRequiredRole>(); if ((requiredRole_AssemblyConnectorCasted != null)) { this._parent.RequiredRole_AssemblyConnector = requiredRole_AssemblyConnectorCasted; return; } } }