public RulesBundle(ContextModel context, BlacklistTermsRule termsRule) { BlacklistOther = new ValidOperatorRule <ContextModel>( context, termsRule.ValidOther, new BlacklistMatch(), parentRule: termsRule, nameof(BlacklistOther)); }
public RulesBundle(ContextModel context, IRule rule) { PartnerDirectoryResourceRule = new ResourceRule <Olma.PartnerDirectory>(context.Parent.DirectoryId, rule) .Include(i => i.OrganizationPartnerDirectories); CustomerNameRequiredRule = new ValidOperatorRule <ContextModel>( context, model => !string.IsNullOrEmpty(model.Parent.CompanyName), new CustomerNameRequired()); BlacklistTermsRule = new BlacklistTermsRule(context, rule); }
public ContextModel(MainRule.ContextModel parent, BlacklistTermsRule termsRule) : base(parent, termsRule) { Rules = new RulesBundle(this, termsRule); }