SelectQuestionOptions
ConsoleMonster.Interactive
One definition for scalar and multiple-choice questions, retaining the original values.
Inheritance
- object
- SelectQuestionOptions
Usage
Explore 51 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 24
- Extension method SelectQuestionOptions.AddChoice
- Extension method SelectQuestionOptions.AddChoices
- Extension method SelectQuestionOptions.Collapsed
- Extension method SelectQuestionOptions.Configure
- Extension method SelectQuestionOptions.Default
- Extension method SelectQuestionOptions.Description
- Extension method SelectQuestionOptions.Maximum
- Extension method SelectQuestionOptions.Minimum
- Extension method SelectQuestionOptions.Multiple
- Extension method SelectQuestionOptions.PageSize
- Extension method SelectQuestionOptions.ParameterName
- Extension method SelectQuestionOptions.Title
- Method SelectQuestionOptionsFluent.AddChoice
- Method SelectQuestionOptionsFluent.AddChoices
- Method SelectQuestionOptionsFluent.Collapsed
- Method SelectQuestionOptionsFluent.Configure
- Method SelectQuestionOptionsFluent.Default
- Method SelectQuestionOptionsFluent.Description
- Method SelectQuestionOptionsFluent.Maximum
- Method SelectQuestionOptionsFluent.Minimum
- Method SelectQuestionOptionsFluent.Multiple
- Method SelectQuestionOptionsFluent.PageSize
- Method SelectQuestionOptionsFluent.ParameterName
- Method SelectQuestionOptionsFluent.Title
Accepted by parameters 27
- Method Question.Select
- Extension method SelectQuestionOptions.AddChoice
- Extension method SelectQuestionOptions.AddChoices
- Extension method SelectQuestionOptions.Collapsed
- Extension method SelectQuestionOptions.Configure
- Extension method SelectQuestionOptions.Configure
- Extension method SelectQuestionOptions.Default
- Extension method SelectQuestionOptions.Description
- Extension method SelectQuestionOptions.Maximum
- Extension method SelectQuestionOptions.Minimum
- Extension method SelectQuestionOptions.Multiple
- Extension method SelectQuestionOptions.PageSize
- Extension method SelectQuestionOptions.ParameterName
- Extension method SelectQuestionOptions.Title
- Method SelectQuestionOptionsFluent.AddChoice
- Method SelectQuestionOptionsFluent.AddChoices
- Method SelectQuestionOptionsFluent.Collapsed
- Method SelectQuestionOptionsFluent.Configure
- Method SelectQuestionOptionsFluent.Configure
- Method SelectQuestionOptionsFluent.Default
- Method SelectQuestionOptionsFluent.Description
- Method SelectQuestionOptionsFluent.Maximum
- Method SelectQuestionOptionsFluent.Minimum
- Method SelectQuestionOptionsFluent.Multiple
- Method SelectQuestionOptionsFluent.PageSize
- Method SelectQuestionOptionsFluent.ParameterName
- Method SelectQuestionOptionsFluent.Title
Constructors
public SelectQuestionOptions() #Inherited Methods
Properties
public string? ParameterName { get; set; } #The caller parameter named when an answer is missing.
public bool Multiple { get; set; } #Whether the answer is a collection instead of one value.
public IList<Choice> Choices { get; } #The prepared choices; their values, enabled state and initial selection are retained.
public object? Default { get; set; } #The default scalar or collection. Omission differs from an explicitly empty selection.
public int? Minimum { get; set; } #The fewest answers; valid only with Multiple.
public int? Maximum { get; set; } #The most answers; valid only with Multiple.
public bool Collapsed { get; set; } #Whether groups start collapsed; valid only with Multiple.
public int PageSize { get; set; } #The preferred number of visible choices; zero retains the renderer default (10 single, 12 multiple).
public Func<object?, IWidget?>? Preview { get; set; } #Preview content for the focused value.
Extension Methods
public static SelectQuestionOptions AddChoice(SelectQuestionOptions selectQuestionOptions, Choice item) #Adds an item to SelectQuestionOptions.Choices: The prepared choices; their values, enabled state and initial selection are retained.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- item ConsoleMonster.Interactive.Choice
- The item.
public static SelectQuestionOptions AddChoices(SelectQuestionOptions selectQuestionOptions, params Choice[] items) #Adds items to SelectQuestionOptions.Choices: The prepared choices; their values, enabled state and initial selection are retained.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- items ConsoleMonster.Interactive.Choice[]
- The items, in order.
public static SelectQuestionOptions AddChoices(SelectQuestionOptions selectQuestionOptions, IEnumerable<Choice> items) #Adds items to SelectQuestionOptions.Choices: The prepared choices; their values, enabled state and initial selection are retained.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.Choice>
- The items, in order.
public static SelectQuestionOptions Collapsed(SelectQuestionOptions selectQuestionOptions, bool value) #Sets SelectQuestionOptions.Collapsed: Whether groups start collapsed; valid only with Multiple.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- value bool
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.SelectQuestionOptions { Collapsed = value }; Ui.Options<global::ConsoleMonster.Interactive.SelectQuestionOptions>().Collapsed(value);public static SelectQuestionOptions Collapsed(SelectQuestionOptions selectQuestionOptions) #Sets SelectQuestionOptions.Collapsed to true.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance to configure.
public static SelectQuestionOptions Configure(SelectQuestionOptions selectQuestionOptions, Action<SelectQuestionOptions> configure) #Assigns callbacks and related configuration without invoking delegate-valued properties.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- configure System.Action<ConsoleMonster.Interactive.SelectQuestionOptions>
- Assignments applied in order.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.SelectQuestionOptions { Preview = value }; Ui.Options<global::ConsoleMonster.Interactive.SelectQuestionOptions>().Configure(configured => configured.Preview = value);public static SelectQuestionOptions Default(SelectQuestionOptions selectQuestionOptions, object? value) #Sets SelectQuestionOptions.Default: The default scalar or collection. Omission differs from an explicitly empty selection.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- value object?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.SelectQuestionOptions { Default = value }; Ui.Options<global::ConsoleMonster.Interactive.SelectQuestionOptions>().Default(value);public static SelectQuestionOptions Description(SelectQuestionOptions selectQuestionOptions, string? value) #Sets SelectQuestionOptions.Description: Help text below the question.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.SelectQuestionOptions { Description = value }; Ui.Options<global::ConsoleMonster.Interactive.SelectQuestionOptions>().Description(value);public static SelectQuestionOptions Maximum(SelectQuestionOptions selectQuestionOptions, int? value) #Sets SelectQuestionOptions.Maximum: The most answers; valid only with Multiple.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- value int?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.SelectQuestionOptions { Maximum = value }; Ui.Options<global::ConsoleMonster.Interactive.SelectQuestionOptions>().Maximum(value);public static SelectQuestionOptions Minimum(SelectQuestionOptions selectQuestionOptions, int? value) #Sets SelectQuestionOptions.Minimum: The fewest answers; valid only with Multiple.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- value int?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.SelectQuestionOptions { Minimum = value }; Ui.Options<global::ConsoleMonster.Interactive.SelectQuestionOptions>().Minimum(value);public static SelectQuestionOptions Multiple(SelectQuestionOptions selectQuestionOptions, bool value) #Sets SelectQuestionOptions.Multiple: Whether the answer is a collection instead of one value.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- value bool
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.SelectQuestionOptions { Multiple = value }; Ui.Options<global::ConsoleMonster.Interactive.SelectQuestionOptions>().Multiple(value);public static SelectQuestionOptions Multiple(SelectQuestionOptions selectQuestionOptions) #Sets SelectQuestionOptions.Multiple to true.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance to configure.
public static SelectQuestionOptions PageSize(SelectQuestionOptions selectQuestionOptions, int value) #Sets SelectQuestionOptions.PageSize: The preferred number of visible choices; zero retains the renderer default (10 single, 12 multiple).
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.SelectQuestionOptions { PageSize = value }; Ui.Options<global::ConsoleMonster.Interactive.SelectQuestionOptions>().PageSize(value);public static SelectQuestionOptions ParameterName(SelectQuestionOptions selectQuestionOptions, string? value) #Sets SelectQuestionOptions.ParameterName: The caller parameter named when an answer is missing.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.SelectQuestionOptions { ParameterName = value }; Ui.Options<global::ConsoleMonster.Interactive.SelectQuestionOptions>().ParameterName(value);public static SelectQuestionOptions Title(SelectQuestionOptions selectQuestionOptions, string value) #Sets SelectQuestionOptions.Title: The question.
Parameters
- selectQuestionOptions ConsoleMonster.Interactive.SelectQuestionOptions
- The instance.
- value string
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.SelectQuestionOptions { Title = value }; Ui.Options<global::ConsoleMonster.Interactive.SelectQuestionOptions>().Title(value);