コード例 #1
0
        public override bool Validate(RuleValidatorContext <T, TProperty> context, SpecificationContainer specificationContainer, ValidationNotification notification)
        {
            SpecificationBase = specificationContainer.TryGetSpecification <TSpecification>() as Validates <TProperty> ??
                                new TSpecification();

            return(base.Validate(context, specificationContainer, notification));
        }
コード例 #2
0
        public override bool Validate(RuleValidatorContext <T, TProperty> context, SpecificationContainer specificationContainer, ValidationNotification notification)
        {
            //Resolve the Specification
            Specification = specificationContainer.TryGetSpecification <TSpecification>() as Validates <TCollectionType> ??
                            new TSpecification();

            return(base.Validate(context, specificationContainer, notification));
        }