예제 #1
0
        public AddValidatorForm(SupportedTypes type, IValidatorsFactory validatorsFactory)
        {
            _validatorsFactory = validatorsFactory;

            InitializeComponent();

            _type = type;
            IsSet = false;

            var tempValidator = (IValidator)Activator.CreateInstance(Type.GetType(type.GetValidatorType()));

            comboBoxOperation.DataSource = Enum.GetValues(Type.GetType(tempValidator.OperationType));
        }
예제 #2
0
        public ExecutionContext(IExecutionOptions executionOptions, IValidatorsFactory validatorsFactory)
        {
            CollectionForceKey = executionOptions.CollectionForceKey;
            RequiredError      = executionOptions.RequiredError;
            DefaultError       = executionOptions.DefaultError;
            MaxDepth           = executionOptions.MaxDepth;
            ValidatorsFactory  = validatorsFactory;

            _defaultErrorCollection = new Lazy <ErrorsCollection>(() =>
            {
                if (DefaultError == null)
                {
                    return(null);
                }

                var defaultErrorCollection = new ErrorsCollection();
                defaultErrorCollection.AddError(DefaultError);

                return(defaultErrorCollection);
            });
        }
예제 #3
0
 public AssetsFieldTests()
 {
     factory = new CustomFactory();
 }
예제 #4
0
 public FluentClientValidator(IValidatorsFactory factory) => _factory = factory;
예제 #5
0
 public DbMapper(IValidatorsFactory validatorsFactory)
 {
     _validatorsFactory = validatorsFactory;
 }