SchemaValidator Class

Definition

This abstract class allows any available library to be used to generate schemas from .NET types and validate objects against schemas.

public abstract class SchemaValidator
type SchemaValidator = class
Public MustInherit Class SchemaValidator
Inheritance
SchemaValidator

Remarks

Defining both GenerateSchema(Type) and TryValidate(Object, Type, String, IEnumerable<Exception>) is required. If you do not wish to validate, then evaluate all schemas as valid.

Constructors

Name Description
SchemaValidator()

Methods

Name Description
GenerateSchema(Type)

Generates a schema from dataType and returns it as a string.

TryValidate(Object, Type, String, IEnumerable<Exception>)

Validates that data is valid according to schemaDefinition.

Applies to