CoreInputExtensions
Registers advanced input callbacks on a core application.
- Kind:
Class - Namespace: Repl
- Assembly:
Repl.Core - Source: src/Repl.Core/Input/CoreInputExtensions.cs
Signature
Section titled “Signature”public static class CoreInputExtensionsInheritance
Section titled “Inheritance”Methods
Section titled “Methods”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)Parameters
Section titled “Parameters”app(CoreReplApp): Application to configure.preprocessor(Func<ArgumentPreprocessingContext, CancellationToken, ArgumentPreprocessingResult>): Callback returning an explicit argument decision.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”app(CoreReplApp): Application to configure.preprocessor(Func<ArgumentPreprocessingContext, CancellationToken, ValueTask<ArgumentPreprocessingResult>>): Callback returning an explicit argument decision.
Returns
Section titled “Returns”CoreReplApp - The same application.
UseInputValidator(CoreReplApp, Delegate)
Section titled “UseInputValidator(CoreReplApp, Delegate)”Adds a validator returning InputValidationResult, with parameters resolved from the current scope.
public static CoreReplApp UseInputValidator(this CoreReplApp app, Delegate validator)Parameters
Section titled “Parameters”app(CoreReplApp): Application to configure.validator(Delegate): Validator accepting ParsedInputContext, services and/or CancellationToken.
Returns
Section titled “Returns”CoreReplApp - The same application.