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)); }
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)); }