Esempio n. 1
0
 /// <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.InnerSourceRole__SourceRole == null))
     {
         ISourceRole innerSourceRole__SourceRoleCasted = item.As <ISourceRole>();
         if ((innerSourceRole__SourceRoleCasted != null))
         {
             this._parent.InnerSourceRole__SourceRole = innerSourceRole__SourceRoleCasted;
             return;
         }
     }
     if ((this._parent.OuterSourceRole__SourceRole == null))
     {
         ISourceRole outerSourceRole__SourceRoleCasted = item.As <ISourceRole>();
         if ((outerSourceRole__SourceRoleCasted != null))
         {
             this._parent.OuterSourceRole__SourceRole = outerSourceRole__SourceRoleCasted;
             return;
         }
     }
     if ((this._parent.AssemblyContext__SourceDelegationConnector == null))
     {
         IAssemblyContext assemblyContext__SourceDelegationConnectorCasted = item.As <IAssemblyContext>();
         if ((assemblyContext__SourceDelegationConnectorCasted != null))
         {
             this._parent.AssemblyContext__SourceDelegationConnector = assemblyContext__SourceDelegationConnectorCasted;
             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.SourceRole__EventChannelSourceRole == null))
     {
         ISourceRole sourceRole__EventChannelSourceRoleCasted = item.As <ISourceRole>();
         if ((sourceRole__EventChannelSourceRoleCasted != null))
         {
             this._parent.SourceRole__EventChannelSourceRole = sourceRole__EventChannelSourceRoleCasted;
             return;
         }
     }
     if ((this._parent.AssemblyContext__EventChannelSourceConnector == null))
     {
         IAssemblyContext assemblyContext__EventChannelSourceConnectorCasted = item.As <IAssemblyContext>();
         if ((assemblyContext__EventChannelSourceConnectorCasted != null))
         {
             this._parent.AssemblyContext__EventChannelSourceConnector = assemblyContext__EventChannelSourceConnectorCasted;
             return;
         }
     }
     if ((this._parent.EventChannel__EventChannelSourceConnector == null))
     {
         IEventChannel eventChannel__EventChannelSourceConnectorCasted = item.As <IEventChannel>();
         if ((eventChannel__EventChannelSourceConnectorCasted != null))
         {
             this._parent.EventChannel__EventChannelSourceConnector = eventChannel__EventChannelSourceConnectorCasted;
             return;
         }
     }
 }
Esempio n. 3
0
            /// <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.EventType__EmitEventAction == null))
                {
                    IEventType eventType__EmitEventActionCasted = item.As <IEventType>();
                    if ((eventType__EmitEventActionCasted != null))
                    {
                        this._parent.EventType__EmitEventAction = eventType__EmitEventActionCasted;
                        return;
                    }
                }
                if ((this._parent.SourceRole__EmitEventAction == null))
                {
                    ISourceRole sourceRole__EmitEventActionCasted = item.As <ISourceRole>();
                    if ((sourceRole__EmitEventActionCasted != null))
                    {
                        this._parent.SourceRole__EmitEventAction = sourceRole__EmitEventActionCasted;
                        return;
                    }
                }
                IVariableUsage inputVariableUsages__CallActionCasted = item.As <IVariableUsage>();

                if ((inputVariableUsages__CallActionCasted != null))
                {
                    this._parent.InputVariableUsages__CallAction.Add(inputVariableUsages__CallActionCasted);
                }
            }