Esempio n. 1
0
        public static void Add(this EngineConfigurator configurator, params Rule[] rules)
        {
            foreach (Rule rule in rules)
            {
                var semanticModelRuleConfigurator = new SemanticModelConfigurator(rule);

                configurator.Add(semanticModelRuleConfigurator);
            }
        }
Esempio n. 2
0
        public static void Rules(this EngineConfigurator configurator,
                                 Action <DesignerRuleConfigurator> configureCallback)
        {
            var designerConfigurator = new DesignerConfiguratorImpl();

            configureCallback(designerConfigurator);

            configurator.Add(designerConfigurator);
        }
Esempio n. 3
0
 public static void Rule <TRule>(this EngineConfigurator configurator, Func <TRule> ruleFactory)
     where TRule : RuleBuilderConfigurator
 {
     configurator.Rules(x => x.Add(ruleFactory));
 }
Esempio n. 4
0
 public static void Rule <TRule>(this EngineConfigurator configurator)
     where TRule : RuleBuilderConfigurator, new()
 {
     Rule(configurator, () => new TRule());
 }