Skip to content

SpectreInteractionHandler

Handles interaction requests using Spectre.Console rich prompts. Returns Unhandled when the terminal does not support interactive Spectre prompts (hosted sessions, redirected input).

public sealed class SpectreInteractionHandler : IReplInteractionHandler

TryHandleAsync(InteractionRequest, CancellationToken)

Section titled “TryHandleAsync(InteractionRequest, CancellationToken)”

Attempts to handle an interaction request.

public ValueTask<InteractionResult> TryHandleAsync(InteractionRequest request, CancellationToken cancellationToken)

ValueTask<InteractionResult> - Success(object) with the result value if handled, or Unhandled to delegate to the next handler.