public SchemaValidator(ISchemaValidatorConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException("configuration"); } InitSchema(configuration.Path); }
private bool TryInitSchemaValidator(ISchemaValidatorConfiguration configuration, out IValidator schemaValidator) { schemaValidator = null; if (configuration == null) { return(false); } if (string.IsNullOrEmpty(configuration.Path)) { return(false); } schemaValidator = new SchemaValidator(configuration); return(true); }