Table of Contents

Interface IValidateHandler<TModel>

Namespace
McMaster.Extensions.CommandLineUtils.SourceGeneration
Assembly
McMaster.Extensions.CommandLineUtils.dll

Strongly-typed handler for validation via OnValidate method.

public interface IValidateHandler<TModel> : IValidateHandler where TModel : class

Type Parameters

TModel

The model type.

Inherited Members

Methods

Invoke(TModel, ValidationContext, CommandLineContext)

Invokes the OnValidate method on the model.

ValidationResult? Invoke(TModel model, ValidationContext validationContext, CommandLineContext commandContext)

Parameters

model TModel

The model instance.

validationContext ValidationContext

The validation context.

commandContext CommandLineContext

The command line context.

Returns

ValidationResult

The validation result, or null if validation passed.