FindRule() 공개 메소드

Provides the sub rule which corresponds to the name provided
public FindRule ( string name ) : Rule
name string
리턴 Rule
예제 #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);
                }
            }
        }