Example #1
0
 public static SiteRules <TCreate, TRuleSetHandler, TRuleRequest> Create()
 {
     _self = new SiteRules <TCreate, TRuleSetHandler, TRuleRequest>
     {
         RuleSets = new List <CreateRule <IRuleSetHandler <RuleRequest>, RuleRequest> >()
     };
     return(_self);
 }
Example #2
0
        public static SiteRules <TCreate, TRuleSetHandler, TRuleRequest> And <TRuleMinder, TCreate, TRuleSetHandler, TRuleRequest>(this SiteRules <TCreate, TRuleSetHandler, TRuleRequest> rules)
            where TRuleMinder : RuleMinder, new()
            where TCreate : CreateRule <TRuleSetHandler, TRuleRequest>
            where TRuleSetHandler : IRuleSetHandler <TRuleRequest>
            where TRuleRequest : IRuleRequest, new()
        {
            var rule = SiteRules <TCreate, TRuleSetHandler, TRuleRequest> .Create();

            foreach (var rr in rules.RuleSets)
            {
                rule.RuleSets.Add(rr);
            }
            return(rule);
        }