public DetailedSpecificationValidationRule(IDetailedSpecification <T, TDetails> detailedSpecification,
                                                   ISpecificationDetailsInterpreter <TDetails> interpreter)
        {
            Argument.NotNull(detailedSpecification);
            Argument.NotNull(interpreter);

            _specification = detailedSpecification;
            _interpreter   = interpreter;
        }
예제 #2
0
 public PCConfigurationValidator(PublishedPCConfigurationSpecification publishedSpecification,
                                 ISpecificationDetailsInterpreter <IPublishedPCConfigurationCheckDetails> publishedDetailsInterpreter)
 {
     RuleFor(x => x.Status).NotEqual(PCConfigurationStatus.Undefined);
     When(x => x.Name != null, () => { this.RuleForNameLength(x => x.Name, 3, 250); });
     When(x => x.Status == PCConfigurationStatus.Published, () =>
     {
         AddRule(new DetailedSpecificationValidationRule <PCConfiguration, IPublishedPCConfigurationCheckDetails>(
                     publishedSpecification, publishedDetailsInterpreter));
     });
 }