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

            _specification = detailedSpecification;
            _interpreter   = interpreter;
        }
Exemple #2
0
        public PublishedPCConfigurationSpecification()
        {
            _nameNotEmptySpecification = new ConfigurationNameNotEmptySpecification();
            _maxLengthSpecification    = new ConfigurationNameMaxLengthSpecification(NameMaxLength);
            var componentTypesSetSpecification = new PCConfigurationHasCorrectSetOfRequiredComponents();

            _componentTypesSetSpecification = componentTypesSetSpecification;
            var componentsCanBePluggedSpecification = new AllRootComponentsCanBePluggedSpecification();

            _componentsCanBePluggedSpecification = componentsCanBePluggedSpecification;

            _internalSpecifications = new Specification <PCConfiguration>[]
            {
                _nameNotEmptySpecification,
                _maxLengthSpecification,
                componentTypesSetSpecification,
                componentsCanBePluggedSpecification
            };
        }
 public override void EstablishContext()
 {
     base.EstablishContext();
     _detailedSpecification = new PublishedPCConfigurationSpecification();
 }