ABB.Swum.SwumBuilder.ApplyRules C# (CSharp) Method

ApplyRules() public method

Applies the rules defined within this SwumBuilder to the specified node. The first matching rule found is used to construct the SWUM.
public ApplyRules ( ProgramElementNode node ) : SwumRule
node ABB.Swum.Nodes.ProgramElementNode The ProgramElementNode to construct a SWUM on.
return SwumRule
        public SwumRule ApplyRules(ProgramElementNode node)
        {
            if (Rules == null) { DefineRuleSet(); }

            foreach (SwumRule rule in this.Rules)
            {
                if (rule.InClass(node))
                {
                    rule.ConstructSwum(node);
                    return rule;
                }
            }
            return null;
        }
    }