| Parameter | Description |
|---|---|
| name | The unique identifier of the option. |
| dataType | The data type of the option. |
IStateOptionBuilder An IStateOptionBuilder to further configure the option.
Adds a new state option.
name is used to identify the option. It must be unique among the options on the state. This name is used as the ID when calling State.GetOptionByName.
If IStateOptionBuilder.WithDisplayName is not used, this name is also used as the option's display label.
protected override void OnDefineOptions(IOptionDefinitionContext context) { context.AddOption("MyOption", typeof(int)) .WithDefaultValue(2) .Delayed(); }
| Parameter | Description |
|---|---|
| name | The unique identifier of the option. |
IStateOptionBuilder<TData> An IStateOptionBuilder to further configure the option.
Adds a new state option.
name is used to identify the option. It must be unique among the options on the state. This name is used as the ID when calling State.GetOptionByName.
If IStateOptionBuilder<T0>.WithDisplayName is not used, this name is also used as the option's display label.
protected override void OnDefineOptions(IOptionDefinitionContext context) { context.AddOption<int>("MyOption") .WithDefaultValue(2) .Delayed(); }