示例#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)
            {
                IVariableUsage outputParameterUsage_SynchronisationPointCasted = item.As <IVariableUsage>();

                if ((outputParameterUsage_SynchronisationPointCasted != null))
                {
                    this._parent.OutputParameterUsage_SynchronisationPoint.Add(outputParameterUsage_SynchronisationPointCasted);
                }
                IForkedBehaviour synchronousForkedBehaviours_SynchronisationPointCasted = item.As <IForkedBehaviour>();

                if ((synchronousForkedBehaviours_SynchronisationPointCasted != null))
                {
                    this._parent.SynchronousForkedBehaviours_SynchronisationPoint.Add(synchronousForkedBehaviours_SynchronisationPointCasted);
                }
            }
示例#2
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)
            {
                IForkedBehaviour forkedBehaviourItem = item.As <IForkedBehaviour>();

                if (((forkedBehaviourItem != null) &&
                     this._parent.AsynchronousForkedBehaviours_ForkAction.Remove(forkedBehaviourItem)))
                {
                    return(true);
                }
                if ((this._parent.SynchronisingBehaviours_ForkAction == item))
                {
                    this._parent.SynchronisingBehaviours_ForkAction = null;
                    return(true);
                }
                return(false);
            }
示例#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)
            {
                IForkedBehaviour asynchronousForkedBehaviours_ForkActionCasted = item.As <IForkedBehaviour>();

                if ((asynchronousForkedBehaviours_ForkActionCasted != null))
                {
                    this._parent.AsynchronousForkedBehaviours_ForkAction.Add(asynchronousForkedBehaviours_ForkActionCasted);
                }
                if ((this._parent.SynchronisingBehaviours_ForkAction == null))
                {
                    ISynchronisationPoint synchronisingBehaviours_ForkActionCasted = item.As <ISynchronisationPoint>();
                    if ((synchronisingBehaviours_ForkActionCasted != null))
                    {
                        this._parent.SynchronisingBehaviours_ForkAction = synchronisingBehaviours_ForkActionCasted;
                        return;
                    }
                }
            }
示例#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)
            {
                IVariableUsage variableUsageItem = item.As <IVariableUsage>();

                if (((variableUsageItem != null) &&
                     this._parent.OutputParameterUsage_SynchronisationPoint.Remove(variableUsageItem)))
                {
                    return(true);
                }
                IForkedBehaviour forkedBehaviourItem = item.As <IForkedBehaviour>();

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