Пример #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);
        }