예제 #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);
                }
            }
예제 #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)
            {
                IAbstractBranchTransition branches_BranchCasted = item.As <IAbstractBranchTransition>();

                if ((branches_BranchCasted != null))
                {
                    this._parent.Branches_Branch.Add(branches_BranchCasted);
                }
            }
예제 #3
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)
            {
                IAbstractBranchTransition abstractBranchTransitionItem = item.As <IAbstractBranchTransition>();

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