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)); }
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); }); }
public AssetsFieldTests() { factory = new CustomFactory(); }
public FluentClientValidator(IValidatorsFactory factory) => _factory = factory;
public DbMapper(IValidatorsFactory validatorsFactory) { _validatorsFactory = validatorsFactory; }