SpectreInteractionHandler
Handles interaction requests using Spectre.Console rich prompts. Returns Unhandled when the terminal does not support interactive Spectre prompts (hosted sessions, redirected input).
- Kind:
Class - Namespace: Repl.Spectre
- Assembly:
Repl.Spectre - Source: src/Repl.Spectre/SpectreInteractionHandler.cs
Signature
Section titled “Signature”public sealed class SpectreInteractionHandler : IReplInteractionHandlerInheritance
Section titled “Inheritance”Implements
Section titled “Implements”Methods
Section titled “Methods”TryHandleAsync(InteractionRequest, CancellationToken)
Section titled “TryHandleAsync(InteractionRequest, CancellationToken)”Attempts to handle an interaction request.
public ValueTask<InteractionResult> TryHandleAsync(InteractionRequest request, CancellationToken cancellationToken)Parameters
Section titled “Parameters”request(InteractionRequest): The interaction request.cancellationToken(CancellationToken): Cancellation token.
Returns
Section titled “Returns”ValueTask<InteractionResult> - Success(object) with the result value if handled,
or Unhandled to delegate to the next handler.