InputExtensions
Registers advanced input callbacks on a DI-enabled application.
- Kind:
Class - Namespace: Repl
- Assembly:
Repl.Defaults - Source: src/Repl.Defaults/InputExtensions.cs
Signature
Section titled “Signature”public static class InputExtensionsInheritance
Section titled “Inheritance”Methods
Section titled “Methods”UseArgumentPreprocessor(ReplApp, Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult>)
Section titled “UseArgumentPreprocessor(ReplApp, Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult>)”Adds an argument adapter, including for preview and completion requests.
public static ReplApp UseArgumentPreprocessor(this ReplApp app, Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult> preprocessor)Parameters
Section titled “Parameters”app(ReplApp): Application to configure.preprocessor(Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult>): Callback returning an explicit argument decision.
Returns
Section titled “Returns”ReplApp - The same application.
UseArgumentPreprocessor(ReplApp, Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>>)
Section titled “UseArgumentPreprocessor(ReplApp, Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>>)”Adds an argument adapter, including for preview and completion requests.
public static ReplApp UseArgumentPreprocessor(this ReplApp app, Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>> preprocessor)Parameters
Section titled “Parameters”app(ReplApp): Application to configure.preprocessor(Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>>): Callback returning an explicit argument decision.
Returns
Section titled “Returns”ReplApp - The same application.
UseInputValidator(ReplApp, Delegate)
Section titled “UseInputValidator(ReplApp, Delegate)”Adds a validator returning InputValidationResult, with parameters resolved from the current scope.
public static ReplApp UseInputValidator(this ReplApp app, Delegate validator)Parameters
Section titled “Parameters”app(ReplApp): Application to configure.validator(Delegate): Validator accepting ParsedInputContext, services and/or CancellationToken.
Returns
Section titled “Returns”ReplApp - The same application.