Table of Contents

Class ArgumentChecker

Namespace
OneImlx.Terminal.Commands.Checkers
Assembly
OneImlx.Terminal.dll

The default argument checker.

public class ArgumentChecker : IArgumentChecker
Inheritance
ArgumentChecker
Implements
Inherited Members

Remarks

The ArgumentChecker uses the ValidationAttribute to check an argument value.

Constructors

ArgumentChecker(IDataTypeMapper<Argument>, TerminalOptions)

Initialize a new instance.

public ArgumentChecker(IDataTypeMapper<Argument> mapper, TerminalOptions options)

Parameters

mapper IDataTypeMapper<Argument>

The argument data-type mapper.

options TerminalOptions

The configuration options.

Methods

CheckArgumentAsync(ArgumentCheckerContext)

Checks Argument asynchronously.

public Task<ArgumentCheckerResult> CheckArgumentAsync(ArgumentCheckerContext context)

Parameters

context ArgumentCheckerContext

The argument check context.

Returns

Task<ArgumentCheckerResult>

The ArgumentCheckerResult instance.

StrictTypeCheckingAsync(ArgumentCheckerContext, DataTypeMapperResult)

Checks the argument value compatibility.

protected Task<OptionCheckerResult> StrictTypeCheckingAsync(ArgumentCheckerContext context, DataTypeMapperResult mapperResult)

Parameters

context ArgumentCheckerContext
mapperResult DataTypeMapperResult

Returns

Task<OptionCheckerResult>