FindAction() public method

Provides the action which corresponds to the name provided
public FindAction ( string name ) : Action
name string
return Action
Example #1
0
        /// <summary>
        ///     Sets the update information for this rule condition (this rule condition updates source)
        /// </summary>
        /// <param name="source"></param>
        public override void SetUpdateInformation(ModelElement source)
        {
            base.SetUpdateInformation(source);
            RuleCondition sourceRuleCondition = (RuleCondition)source;

            foreach (Action action in Actions)
            {
                Action baseAction = sourceRuleCondition.FindAction(action.Name);
                if (baseAction != null)
                {
                    action.SetUpdateInformation(baseAction);
                }
            }

            foreach (PreCondition preCondition in PreConditions)
            {
                PreCondition basePreCondition = sourceRuleCondition.FindPreCondition(preCondition.Name);
                if (basePreCondition != null)
                {
                    preCondition.SetUpdateInformation(basePreCondition);
                }
            }

            foreach (Rule rule in SubRules)
            {
                Rule baseRule = sourceRuleCondition.FindRule(rule.Name);
                if (baseRule != null)
                {
                    rule.SetUpdateInformation(baseRule);
                }
            }
        }