Class ValidationBuilder
Default implementation of IOptionValidationBuilder and IArgumentValidationBuilder.
Namespace: McMaster.Extensions.CommandLineUtils.Validation
Assembly: McMaster.Extensions.CommandLineUtils.dll
Syntax
public class ValidationBuilder : IOptionValidationBuilder, IArgumentValidationBuilder, IValidationBuilder
Constructors
| Improve this Doc View SourceValidationBuilder(CommandArgument)
Creates a new instance of ValidationBuilder for a given CommandArgument.
Declaration
public ValidationBuilder(CommandArgument argument)
Parameters
Type | Name | Description |
---|---|---|
CommandArgument | argument | The argument. |
ValidationBuilder(CommandOption)
Creates a new instance of ValidationBuilder for a given CommandOption.
Declaration
public ValidationBuilder(CommandOption option)
Parameters
Type | Name | Description |
---|---|---|
CommandOption | option | The option. |
Methods
| Improve this Doc View SourceUse(IValidator)
Adds a validator to the argument or option.
Declaration
public void Use(IValidator validator)
Parameters
Type | Name | Description |
---|---|---|
IValidator | validator |
Explicit Interface Implementations
| Improve this Doc View SourceIArgumentValidationBuilder.Use(IArgumentValidator)
Declaration
void IArgumentValidationBuilder.Use(IArgumentValidator validator)
Parameters
Type | Name | Description |
---|---|---|
IArgumentValidator | validator |
IOptionValidationBuilder.Use(IOptionValidator)
Declaration
void IOptionValidationBuilder.Use(IOptionValidator validator)
Parameters
Type | Name | Description |
---|---|---|
IOptionValidator | validator |