Table of Contents

Interface IValidateHandler

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

Handles validation via OnValidate method without reflection.

public interface IValidateHandler

Methods

Invoke(object, ValidationContext, CommandLineContext)

Invokes the OnValidate method on the model.

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

Parameters

model object

The model instance.

validationContext ValidationContext

The validation context.

commandContext CommandLineContext

The command line context.

Returns

ValidationResult

The validation result, or null if validation passed.