コード例 #1
0
 public RulesBundle(ContextModel context, BlacklistTermsRule termsRule)
 {
     BlacklistOther = new ValidOperatorRule <ContextModel>(
         context,
         termsRule.ValidOther,
         new BlacklistMatch(),
         parentRule: termsRule,
         nameof(BlacklistOther));
 }
コード例 #2
0
            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);
            }
コード例 #3
0
 public ContextModel(MainRule.ContextModel parent, BlacklistTermsRule termsRule) : base(parent, termsRule)
 {
     Rules = new RulesBundle(this, termsRule);
 }