/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IBranchTransition branchTransitions_BranchCasted = item.As <IBranchTransition>(); if ((branchTransitions_BranchCasted != null)) { this._parent.BranchTransitions_Branch.Add(branchTransitions_BranchCasted); } }
/// <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) { IBranchTransition branchTransitionItem = item.As <IBranchTransition>(); if (((branchTransitionItem != null) && this._parent.BranchTransitions_Branch.Remove(branchTransitionItem))) { return(true); } return(false); }
/// <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.UsageScenario_SenarioBehaviour == null)) { IUsageScenario usageScenario_SenarioBehaviourCasted = item.As <IUsageScenario>(); if ((usageScenario_SenarioBehaviourCasted != null)) { this._parent.UsageScenario_SenarioBehaviour = usageScenario_SenarioBehaviourCasted; return; } } if ((this._parent.BranchTransition_ScenarioBehaviour == null)) { IBranchTransition branchTransition_ScenarioBehaviourCasted = item.As <IBranchTransition>(); if ((branchTransition_ScenarioBehaviourCasted != null)) { this._parent.BranchTransition_ScenarioBehaviour = branchTransition_ScenarioBehaviourCasted; return; } } if ((this._parent.Loop_ScenarioBehaviour == null)) { ILoop loop_ScenarioBehaviourCasted = item.As <ILoop>(); if ((loop_ScenarioBehaviourCasted != null)) { this._parent.Loop_ScenarioBehaviour = loop_ScenarioBehaviourCasted; return; } } IAbstractUserAction actions_ScenarioBehaviourCasted = item.As <IAbstractUserAction>(); if ((actions_ScenarioBehaviourCasted != null)) { this._parent.Actions_ScenarioBehaviour.Add(actions_ScenarioBehaviourCasted); } }