Beispiel #1
0
        public static void Rule <TRule>(this RulesEngineConfigurator configurator, Func <TRule> ruleFactory)
            where TRule : RuleDefinition
        {
            TRule ruleDesigner = ruleFactory();

            Rule rule = ruleDesigner.Build();

            configurator.Add(rule);
        }
Beispiel #2
0
 public static void Rule <TRule>(this RulesEngineConfigurator configurator)
     where TRule : RuleDefinition, new()
 {
     Rule(configurator, () => new TRule());
 }