Table of Contents

Interface IFlowStepContent<TResult>

Namespace
SharpConsoleUI.Flows
Assembly
SharpConsoleUI.dll

A self-contained flow step body that produces a typed result. The host places the control returned by BuildContent(FlowChrome) inside the step window and awaits Completion (or a button click) to resolve the step.

public interface IFlowStepContent<TResult>

Type Parameters

TResult

The type of value produced when the step completes.

Extension Methods

Properties

Completion

Completes when the step body resolves itself — for example, when the user presses Enter on a list (body self-resolve). Returns null when the step is dismissed or cancelled. Static or button-driven content may leave this task permanently incomplete.

Task<TResult?> Completion { get; }

Property Value

Task<TResult>

Methods

BuildContent(FlowChrome)

Builds and returns the control to display inside the host window's content region. Called once per presentation. The returned control is owned by the host for its lifetime.

IWindowControl BuildContent(FlowChrome chrome)

Parameters

chrome FlowChrome

Chrome hints for title, size, and button row.

Returns

IWindowControl

The content control to display.

Events

StateChanged

Raised AFTER the content has written its live value into the step's internal state, so the host can re-evaluate dynamic button enable-predicates in place. Contract: mutate state, THEN raise. Built-in Prompt/Confirm raise this on each edit; static content may never raise it.

event Action? StateChanged

Event Type

Action