Example #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.AbstractLoopAction_ResourceDemandingBehaviour == null))
                {
                    IAbstractLoopAction abstractLoopAction_ResourceDemandingBehaviourCasted = item.As <IAbstractLoopAction>();
                    if ((abstractLoopAction_ResourceDemandingBehaviourCasted != null))
                    {
                        this._parent.AbstractLoopAction_ResourceDemandingBehaviour = abstractLoopAction_ResourceDemandingBehaviourCasted;
                        return;
                    }
                }
                if ((this._parent.AbstractBranchTransition_ResourceDemandingBehaviour == null))
                {
                    IAbstractBranchTransition abstractBranchTransition_ResourceDemandingBehaviourCasted = item.As <IAbstractBranchTransition>();
                    if ((abstractBranchTransition_ResourceDemandingBehaviourCasted != null))
                    {
                        this._parent.AbstractBranchTransition_ResourceDemandingBehaviour = abstractBranchTransition_ResourceDemandingBehaviourCasted;
                        return;
                    }
                }
                IAbstractAction steps_BehaviourCasted = item.As <IAbstractAction>();

                if ((steps_BehaviourCasted != null))
                {
                    this._parent.Steps_Behaviour.Add(steps_BehaviourCasted);
                }
            }
Example #2
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.Predecessor_AbstractAction == null))
     {
         IAbstractAction predecessor_AbstractActionCasted = item.As <IAbstractAction>();
         if ((predecessor_AbstractActionCasted != null))
         {
             this._parent.Predecessor_AbstractAction = predecessor_AbstractActionCasted;
             return;
         }
     }
     if ((this._parent.Successor_AbstractAction == null))
     {
         IAbstractAction successor_AbstractActionCasted = item.As <IAbstractAction>();
         if ((successor_AbstractActionCasted != null))
         {
             this._parent.Successor_AbstractAction = successor_AbstractActionCasted;
             return;
         }
     }
     if ((this._parent.ResourceDemandingBehaviour_AbstractAction == null))
     {
         IResourceDemandingBehaviour resourceDemandingBehaviour_AbstractActionCasted = item.As <IResourceDemandingBehaviour>();
         if ((resourceDemandingBehaviour_AbstractActionCasted != null))
         {
             this._parent.ResourceDemandingBehaviour_AbstractAction = resourceDemandingBehaviour_AbstractActionCasted;
             return;
         }
     }
 }
Example #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)
            {
                IAbstractAction steps_BehaviourCasted = item.As <IAbstractAction>();

                if ((steps_BehaviourCasted != null))
                {
                    this._parent.Steps_Behaviour.Add(steps_BehaviourCasted);
                }
            }
Example #4
0
            /// <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)
            {
                IAbstractAction abstractActionItem = item.As <IAbstractAction>();

                if (((abstractActionItem != null) &&
                     this._parent.Steps_Behaviour.Remove(abstractActionItem)))
                {
                    return(true);
                }
                return(false);
            }
Example #5
0
            /// <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)
            {
                if ((this._parent.AbstractLoopAction_ResourceDemandingBehaviour == item))
                {
                    this._parent.AbstractLoopAction_ResourceDemandingBehaviour = null;
                    return(true);
                }
                if ((this._parent.AbstractBranchTransition_ResourceDemandingBehaviour == item))
                {
                    this._parent.AbstractBranchTransition_ResourceDemandingBehaviour = null;
                    return(true);
                }
                IAbstractAction abstractActionItem = item.As <IAbstractAction>();

                if (((abstractActionItem != null) &&
                     this._parent.Steps_Behaviour.Remove(abstractActionItem)))
                {
                    return(true);
                }
                return(false);
            }