예제 #1
0
        public static Rule Rule(Action <RuleContextBuilder> ruleDefinition)
        {
            var builder = new RuleContextBuilder();

            ruleDefinition(builder);
            var system = builder.Build();

            return(system);
        }
예제 #2
0
        public RuleSystemBuilder Rule(Action <RuleContextBuilder> ruleDefinition)
        {
            var builder = new RuleContextBuilder();

            ruleDefinition(builder);
            var rule = builder.Build();

            _rules.Add(rule);
            return(this);
        }