/// <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.AssemblyContext__SinkDelegationConnector == null)) { IAssemblyContext assemblyContext__SinkDelegationConnectorCasted = item.As <IAssemblyContext>(); if ((assemblyContext__SinkDelegationConnectorCasted != null)) { this._parent.AssemblyContext__SinkDelegationConnector = assemblyContext__SinkDelegationConnectorCasted; return; } } if ((this._parent.InnerSinkRole__SinkRole == null)) { ISinkRole innerSinkRole__SinkRoleCasted = item.As <ISinkRole>(); if ((innerSinkRole__SinkRoleCasted != null)) { this._parent.InnerSinkRole__SinkRole = innerSinkRole__SinkRoleCasted; return; } } if ((this._parent.OuterSinkRole__SinkRole == null)) { ISinkRole outerSinkRole__SinkRoleCasted = item.As <ISinkRole>(); if ((outerSinkRole__SinkRoleCasted != null)) { this._parent.OuterSinkRole__SinkRole = outerSinkRole__SinkRoleCasted; 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.SinkRole__EventChannelSinkConnector == null)) { ISinkRole sinkRole__EventChannelSinkConnectorCasted = item.As <ISinkRole>(); if ((sinkRole__EventChannelSinkConnectorCasted != null)) { this._parent.SinkRole__EventChannelSinkConnector = sinkRole__EventChannelSinkConnectorCasted; return; } } if ((this._parent.FilterCondition__EventChannelSinkConnector == null)) { IPCMRandomVariable filterCondition__EventChannelSinkConnectorCasted = item.As <IPCMRandomVariable>(); if ((filterCondition__EventChannelSinkConnectorCasted != null)) { this._parent.FilterCondition__EventChannelSinkConnector = filterCondition__EventChannelSinkConnectorCasted; return; } } if ((this._parent.AssemblyContext__EventChannelSinkConnector == null)) { IAssemblyContext assemblyContext__EventChannelSinkConnectorCasted = item.As <IAssemblyContext>(); if ((assemblyContext__EventChannelSinkConnectorCasted != null)) { this._parent.AssemblyContext__EventChannelSinkConnector = assemblyContext__EventChannelSinkConnectorCasted; return; } } if ((this._parent.EventChannel__EventChannelSinkConnector == null)) { IEventChannel eventChannel__EventChannelSinkConnectorCasted = item.As <IEventChannel>(); if ((eventChannel__EventChannelSinkConnectorCasted != null)) { this._parent.EventChannel__EventChannelSinkConnector = eventChannel__EventChannelSinkConnectorCasted; return; } } }