Class ActivitySpecBuilder
Fluent builder for an ActivityDialogSpec. Add columns first, then rows; call
Build() (done automatically by the run API) to validate and freeze the spec.
public sealed class ActivitySpecBuilder
- Inheritance
-
ActivitySpecBuilder
- Inherited Members
Methods
AddColumn(int?, CliColumnSizing, CliTextAlignment?, ThemeStyle?)
Adds a column. A fixed
width is mutually exclusive with star sizing. Leave
align null to defer to the spec default / built-in fallback.public ActivitySpecBuilder AddColumn(int? width = null, CliColumnSizing sizing = CliColumnSizing.Auto, CliTextAlignment? align = null, ThemeStyle? style = null)
Parameters
widthint?sizingCliColumnSizingalignCliTextAlignment?styleThemeStyle?
Returns
AddRow(string?, Action<ActivityRowBuilder>)
Adds a row. Pass a unique
name for a dynamic row (which must declare
Values(...)), or null for a static row.public ActivitySpecBuilder AddRow(string? name, Action<ActivityRowBuilder> configure)
Parameters
namestringconfigureAction<ActivityRowBuilder>
Returns
Build()
Validates and produces the immutable ActivityDialogSpec.
public ActivityDialogSpec Build()
Returns
Padding(CliCellPadding)
Sets the cell
padding on the most-recently-added column (chains after
AddColumn(int?, CliColumnSizing, CliTextAlignment?, ThemeStyle?)). A cell's own padding overrides the column padding.public ActivitySpecBuilder Padding(CliCellPadding padding)
Parameters
paddingCliCellPadding
Returns
SetDefaultCellAlignment(CliTextAlignment)
Sets the spec-wide default horizontal alignment for text cells (applied when a text element and
its column both leave alignment unset). Text-element and column alignments take precedence.
public ActivitySpecBuilder SetDefaultCellAlignment(CliTextAlignment alignment)
Parameters
alignmentCliTextAlignment
Returns
SetDefaultCellStyle(ThemeStyle)
Sets the spec-wide default theme style for text cells (applied when a text element and its column
both leave the style unset). Text-element and column styles take precedence over this.
public ActivitySpecBuilder SetDefaultCellStyle(ThemeStyle style)
Parameters
styleThemeStyle
Returns
SetNonInteractiveMessage(string?)
Sets a one-line message printed once before the operation runs when the activity is executed in
non-interactive mode (in place of the live dialog). Ignored in interactive mode;
null/empty
prints nothing. It is a trusted markup template — prefer present-progress phrasing (e.g.
"Importing card...") and localize it at the call site. Use this explicit spec-based control
when non-interactive output should differ from the visible activity message.public ActivitySpecBuilder SetNonInteractiveMessage(string? message)
Parameters
messagestring