SelectPromptFluent
ConsoleMonster.Interactive
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
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?>
- The instance.
- items ConsoleMonster.Interactive.Choice[]
- The items, in order.
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?>
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.Choice>
- The items, in order.
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?>
- The instance.
- item ConsoleMonster.Interactive.Choice
- The item.
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?>
- The instance.
- configure System.Action<ConsoleMonster.Interactive.SelectPrompt<T?>>
- Assignments applied in order.
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?>
- The instance.
- value T?
- The value.
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?>
- The instance.
- value string?
- The value.
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?>
- The instance.
- value int
- The value.
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?>
- The instance.
- value string?
- The value.
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?>
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
selectPrompt.Title = value; selectPrompt.Title(value);