예제 #1
0
 public SchemaValidator(ISchemaValidatorConfiguration configuration)
 {
     if (configuration == null)
     {
         throw new ArgumentNullException("configuration");
     }
     InitSchema(configuration.Path);
 }
예제 #2
0
 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);
 }