Skip to content

CoreInputExtensions

Registers advanced input callbacks on a core application.

public static class CoreInputExtensions

UseArgumentPreprocessor(CoreReplApp, Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult>)

Section titled “UseArgumentPreprocessor(CoreReplApp, Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult>)”

Adds an argument adapter, including for preview and completion requests.

public static CoreReplApp UseArgumentPreprocessor(this CoreReplApp app, Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult> preprocessor)
  • app (CoreReplApp): Application to configure.
  • preprocessor (Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult>): Callback returning an explicit argument decision.

CoreReplApp - The same application.

UseArgumentPreprocessor(CoreReplApp, Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>>)

Section titled “UseArgumentPreprocessor(CoreReplApp, Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>>)”

Adds an argument adapter, including for preview and completion requests.

public static CoreReplApp UseArgumentPreprocessor(this CoreReplApp app, Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>> preprocessor)
  • app (CoreReplApp): Application to configure.
  • preprocessor (Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>>): Callback returning an explicit argument decision.

CoreReplApp - The same application.

Adds a validator returning InputValidationResult, with parameters resolved from the current scope.

public static CoreReplApp UseInputValidator(this CoreReplApp app, Delegate validator)
  • app (CoreReplApp): Application to configure.
  • validator (Delegate): Validator accepting ParsedInputContext, services and/or CancellationToken.

CoreReplApp - The same application.