Beispiel #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)
            {
                IRecoveryActionBehaviour recoveryActionBehaviours__RecoveryActionCasted = item.As <IRecoveryActionBehaviour>();

                if ((recoveryActionBehaviours__RecoveryActionCasted != null))
                {
                    this._parent.RecoveryActionBehaviours__RecoveryAction.Add(recoveryActionBehaviours__RecoveryActionCasted);
                }
            }
Beispiel #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)
            {
                IRecoveryActionBehaviour recoveryActionBehaviourItem = item.As <IRecoveryActionBehaviour>();

                if (((recoveryActionBehaviourItem != null) &&
                     this._parent.RecoveryActionBehaviours__RecoveryAction.Remove(recoveryActionBehaviourItem)))
                {
                    return(true);
                }
                return(false);
            }
Beispiel #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.PrimaryBehaviour__RecoveryAction == null))
                {
                    IRecoveryActionBehaviour primaryBehaviour__RecoveryActionCasted = item.As <IRecoveryActionBehaviour>();
                    if ((primaryBehaviour__RecoveryActionCasted != null))
                    {
                        this._parent.PrimaryBehaviour__RecoveryAction = primaryBehaviour__RecoveryActionCasted;
                        return;
                    }
                }
                IRecoveryActionBehaviour recoveryActionBehaviours__RecoveryActionCasted = item.As <IRecoveryActionBehaviour>();

                if ((recoveryActionBehaviours__RecoveryActionCasted != null))
                {
                    this._parent.RecoveryActionBehaviours__RecoveryAction.Add(recoveryActionBehaviours__RecoveryActionCasted);
                }
            }