Table of Contents

Interface IFlowHost

Namespace
SharpConsoleUI.Flows
Assembly
SharpConsoleUI.dll

The pluggable presentation seam for flow steps. A host takes an IFlowStepContent<TResult> plus its FlowChrome, renders it (with the standardized button row), and resolves to a FlowStepOutcome<TResult> carrying BOTH the content's typed value AND the chosen navigation verdict — so a wizard can navigate Next/Back/Cancel/Finish.

public interface IFlowHost
Extension Methods

Remarks

The framework default is ModalWindowHost (one modal window per step). Tests use a scripted headless host. The host renders the chrome's button row; content that builds its own buttons (the framework primitives) is presented with an empty Buttons set and resolves via its own Completion instead.

Methods

PresentAsync<TResult>(IFlowStepContent<TResult>, FlowChrome, CancellationToken)

Presents content using chrome and resolves to its outcome.

Task<FlowStepOutcome<TResult>> PresentAsync<TResult>(IFlowStepContent<TResult> content, FlowChrome chrome, CancellationToken ct)

Parameters

content IFlowStepContent<TResult>

The step body to present.

chrome FlowChrome

Chrome hints (title, size, step indicator, button row).

ct CancellationToken

Cancellation token; when tripped the step resolves with Cancel.

Returns

Task<FlowStepOutcome<TResult>>

A task completing with the step's FlowStepOutcome<TResult>: the content value plus the navigation verdict (or (default, Cancel) on dismiss/cancellation).

Type Parameters

TResult

The content's result type.