Show / Hide Table of Contents

Interface IValidatesValidationManifest

An object which may be used to assert that a validation manifest is valid. Essentially this object may serve as "a validator validator".

Namespace: CSF.Validation.ValidatorValidation
Assembly: CSF.Validation.StandardRules.dll
Syntax
public interface IValidatesValidationManifest
Remarks

You may use the default implementation of this object within your application's integration tests in order to verify that your use of the validation framework is itself valid. This object can detect a number of mistakes within validation manifests and hilight them at test-time rather than allowing them to become runtime errors.

This interface has overloads of the ValidateAsync method to validate any of:

  • A validation manifest
  • A validator builder
  • A validation manifest model

Methods

| Improve this Doc View Source

ValidateAsync(ValidationManifest, ValidationOptions, CancellationToken)

Validates the validation manifest and returns a validation result.

Declaration
Task<IQueryableValidationResult<ValidationManifest>> ValidateAsync(ValidationManifest manifest, ValidationOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
ValidationManifest manifest

The validation manifest to be validated.

ValidationOptions options

An optional collection of validation options.

System.Threading.CancellationToken cancellationToken

An optional cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IQueryableValidationResult<ValidationManifest>>

A queryable validation result.

| Improve this Doc View Source

ValidateAsync(Value, Type, ValidationOptions, CancellationToken)

Validates a validation manifest model and returns a validation result.

Declaration
Task<IQueryableValidationResult<ValidationManifest>> ValidateAsync(Value model, Type validatedType, ValidationOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
Value model

The validation manifest model to be validated.

System.Type validatedType

The type validated by the model.

ValidationOptions options

An optional collection of validation options.

System.Threading.CancellationToken cancellationToken

An optional cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IQueryableValidationResult<ValidationManifest>>

A queryable validation result.

| Improve this Doc View Source

ValidateAsync<T>(IBuildsValidator<T>, ValidationOptions, CancellationToken)

Validates a validator builder and returns a validation result.

Declaration
Task<IQueryableValidationResult<ValidationManifest>> ValidateAsync<T>(IBuildsValidator<T> builder, ValidationOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IBuildsValidator<T> builder

The validation builder to be validated.

ValidationOptions options

An optional collection of validation options.

System.Threading.CancellationToken cancellationToken

An optional cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IQueryableValidationResult<ValidationManifest>>

A queryable validation result.

Type Parameters
Name Description
T

The generic type validated by the builder.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX