Class ManualChoiceInput
- Namespace
- Invex.Atom.Workflows.Definition.Triggers
- Assembly
- Invex.Atom.Workflows.dll
Represents a manual input in a workflow where the user selects a value from a predefined list of choices.
public sealed record ManualChoiceInput : ManualInput
- Inheritance
-
objectManualChoiceInput
- Inherited Members
Constructors
ManualChoiceInput(string, string, bool?, IReadOnlyList<string>, string?)
Represents a manual input in a workflow where the user selects a value from a predefined list of choices.
public ManualChoiceInput(string Name, string Description, bool? Required, IReadOnlyList<string> Choices, string? DefaultValue = null)
Parameters
NamestringThe name of the input field.
DescriptionstringA human-readable description of the input.
Requiredbool?A value indicating whether this input is mandatory.
ChoicesIReadOnlyList<string>A read-only list of string options the user can choose from.
DefaultValuestringAn optional default value that will be pre-selected.
Properties
Choices
A read-only list of string options the user can choose from.
public IReadOnlyList<string> Choices { get; init; }
Property Value
- IReadOnlyList<string>
DefaultValue
An optional default value that will be pre-selected.
public string? DefaultValue { get; init; }
Property Value
- string
Methods
ForParam(ParamDefinition, IReadOnlyList<string>, bool?, string?)
Creates a ManualChoiceInput instance based on a ParamDefinition.
public static ManualChoiceInput ForParam(ParamDefinition paramDefinition, IReadOnlyList<string> choices, bool? required = null, string? defaultValue = null)
Parameters
paramDefinitionParamDefinitionThe parameter definition to create the input from.
choicesIReadOnlyList<string>The list of choices for this input.
requiredbool?An optional boolean to override the required status.
defaultValuestringThe default value for this input.
Returns
- ManualChoiceInput
A new instance of ManualChoiceInput.