Skip to content
ConsoleMonster
Class

SelectPromptFluent

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Modifiers
static
Attributes
GeneratedCode("ConsoleMonster.Generators", "1.0.0")

The fluent methods of SelectPrompt<T>, generated from its public properties: A property-named method sets a property and Add... adds to a collection, both returning the same instance.

Inheritance

  • object
  • SelectPromptFluent

Methods

AddChoices``1 2 overloads
public static SelectPrompt<T?> AddChoices<T>(SelectPrompt<T?> selectPrompt, params Choice[] items) #

Adds items to SelectPrompt<T>.Choices: The choices, in display order.

Type Parameters

T

Parameters

selectPrompt ConsoleMonster.Interactive.SelectPrompt<T?> required
The instance.
items ConsoleMonster.Interactive.Choice[] required
The items, in order.

Returns

SelectPrompt<T?> The same instance.
public static SelectPrompt<T?> AddChoices<T>(SelectPrompt<T?> selectPrompt, IEnumerable<Choice> items) #

Adds items to SelectPrompt<T>.Choices: The choices, in display order.

Type Parameters

T

Parameters

selectPrompt ConsoleMonster.Interactive.SelectPrompt<T?> required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.Choice> required
The items, in order.

Returns

SelectPrompt<T?> The same instance.
public static SelectPrompt<T?> AddChoice<T>(SelectPrompt<T?> selectPrompt, Choice item) #

Adds an item to SelectPrompt<T>.Choices: The choices, in display order.

Type Parameters

T

Parameters

selectPrompt ConsoleMonster.Interactive.SelectPrompt<T?> required
The instance.
item ConsoleMonster.Interactive.Choice required
The item.

Returns

SelectPrompt<T?> The same instance.
public static SelectPrompt<T?> Configure<T>(SelectPrompt<T?> selectPrompt, Action<SelectPrompt<T?>> configure) #

Assigns callbacks and related configuration without invoking delegate-valued properties.

Type Parameters

T

Parameters

selectPrompt ConsoleMonster.Interactive.SelectPrompt<T?> required
The instance.
configure System.Action<ConsoleMonster.Interactive.SelectPrompt<T?>> required
Assignments applied in order.

Returns

SelectPrompt<T?> The same instance.

Examples

// C# initializer or property    // C# fluent
selectPrompt.Preview = value;    selectPrompt.Configure(configured => configured.Preview = value);
// C# initializer or property        // C# fluent
selectPrompt.PreviewText = value;    selectPrompt.Configure(configured => configured.PreviewText = value);
public static SelectPrompt<T?> Default<T>(SelectPrompt<T?> selectPrompt, T? value) #

Sets Prompt<`0>.Default: The default answer: pre-selected, accepted with Enter, and returned in non-interactive sessions.

Type Parameters

T

Parameters

selectPrompt ConsoleMonster.Interactive.SelectPrompt<T?> required
The instance.
value T? required
The value.

Returns

SelectPrompt<T?> The same instance.

Examples

// C# initializer or property    // C# fluent
selectPrompt.Default = value;    selectPrompt.Default(value);
public static SelectPrompt<T?> Description<T>(SelectPrompt<T?> selectPrompt, string? value) #

Sets Prompt<`0>.Description: Help text under the question.

Type Parameters

T

Parameters

selectPrompt ConsoleMonster.Interactive.SelectPrompt<T?> required
The instance.
value string? required
The value.

Returns

SelectPrompt<T?> The same instance.

Examples

// C# initializer or property        // C# fluent
selectPrompt.Description = value;    selectPrompt.Description(value);
public static SelectPrompt<T?> PageSize<T>(SelectPrompt<T?> selectPrompt, int value) #

Sets SelectPrompt<T>.PageSize: The preferred number of visible rows.

Type Parameters

T

Parameters

selectPrompt ConsoleMonster.Interactive.SelectPrompt<T?> required
The instance.
value int required
The value.

Returns

SelectPrompt<T?> The same instance.

Examples

// C# initializer or property     // C# fluent
selectPrompt.PageSize = value;    selectPrompt.PageSize(value);
public static SelectPrompt<T?> ParameterName<T>(SelectPrompt<T?> selectPrompt, string? value) #

Sets Prompt<`0>.ParameterName: The parameter that supplies this value non-interactively (-Domain, --domain); named in the non-interactive error message.

Type Parameters

T

Parameters

selectPrompt ConsoleMonster.Interactive.SelectPrompt<T?> required
The instance.
value string? required
The value.

Returns

SelectPrompt<T?> The same instance.

Examples

// C# initializer or property          // C# fluent
selectPrompt.ParameterName = value;    selectPrompt.ParameterName(value);
public static SelectPrompt<T?> Title<T>(SelectPrompt<T?> selectPrompt, string value) #

Sets Prompt<`0>.Title: The question.

Type Parameters

T

Parameters

selectPrompt ConsoleMonster.Interactive.SelectPrompt<T?> required
The instance.
value string required
The value.

Returns

SelectPrompt<T?> The same instance.

Examples

// C# initializer or property    // C# fluent
selectPrompt.Title = value;      selectPrompt.Title(value);