Skip to content

SpectreInteractionPresenter

Spectre-aware interaction presenter that supports explicit output capture when an application temporarily owns the terminal surface.

public sealed class SpectreInteractionPresenter : IReplInteractionPresenter

SpectreInteractionPresenter(InteractionOptions, OutputOptions)

Section titled “SpectreInteractionPresenter(InteractionOptions, OutputOptions)”

Creates a presenter backed by the default console interaction presenter.

public SpectreInteractionPresenter(InteractionOptions options, OutputOptions outputOptions)

Redirects interaction events to the provided sink for the current async flow. Dispose the returned scope to restore the previous sink.

public IDisposable BeginCapture(IReplInteractionPresenter sink)

IDisposable

Redirects interaction events to a plain text writer for the current async flow. The writer sink never emits ANSI control sequences or OSC progress messages.

public IDisposable BeginCapture(TextWriter writer)

IDisposable

PresentAsync(ReplInteractionEvent, CancellationToken)

Section titled “PresentAsync(ReplInteractionEvent, CancellationToken)”

Presents one semantic event.

public ValueTask PresentAsync(ReplInteractionEvent evt, CancellationToken cancellationToken)

ValueTask - An asynchronous operation.