Class UiOptionFactory
Factory class for creating UiOption instances.
Inherited Members
Namespace: Serenity.Ui.Domain.Services
Assembly: Serenity.Ui.Domain.dll
Syntax
public class UiOptionFactory
Constructors
UiOptionFactory(UiOptionValueFactory)
Initializes a new instance of the UiOptionFactory class with the specified UiOptionValueFactory.
Declaration
public UiOptionFactory(UiOptionValueFactory uiOptionValueFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| UiOptionValueFactory | uiOptionValueFactory | The UiOptionValueFactory used to create UiOptionValue instances. |
Methods
CreateBoolUiOption(UiOption, GameSettingsEntity)
Creates a boolean UiOption instance based on the provided option and game settings.
Declaration
public UiOption CreateBoolUiOption(UiOption option, GameSettingsEntity optionSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| UiOption | option | The UiOption template to base the new option on. |
| GameSettingsEntity | optionSettings | The game settings to apply to the new option. |
Returns
| Type | Description |
|---|---|
| UiOption | A new UiOption instance configured as a boolean option. |
CreateFloatUiOption(UiOption, GameSettingsEntity)
Creates a float UiOption instance based on the provided option and game settings.
Declaration
public UiOption CreateFloatUiOption(UiOption option, GameSettingsEntity optionSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| UiOption | option | The UiOption template to base the new option on. |
| GameSettingsEntity | optionSettings | The game settings to apply to the new option. |
Returns
| Type | Description |
|---|---|
| UiOption | A new UiOption instance configured as a float option. |
CreateIntegerUiOption(UiOption, GameSettingsEntity)
Declaration
public UiOption CreateIntegerUiOption(UiOption option, GameSettingsEntity optionSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| UiOption | option | |
| GameSettingsEntity | optionSettings |
Returns
| Type | Description |
|---|---|
| UiOption |
CreateSelectableUiOption(UiOption, GameSettingsEntity)
Creates a selectable UiOption instance based on the provided option and game settings.
Declaration
public UiOption CreateSelectableUiOption(UiOption option, GameSettingsEntity optionSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| UiOption | option | The UiOption template to base the new option on. |
| GameSettingsEntity | optionSettings | The game settings to apply to the new option. |
Returns
| Type | Description |
|---|---|
| UiOption | A new UiOption instance configured as a selectable option. |
CreateStringUiOption(UiOption, GameSettingsEntity)
Creates a string UiOption instance based on the provided option and game settings.
Declaration
public UiOption CreateStringUiOption(UiOption option, GameSettingsEntity optionSettings)
Parameters
| Type | Name | Description |
|---|---|---|
| UiOption | option | The UiOption template to base the new option on. |
| GameSettingsEntity | optionSettings | The game settings to apply to the new option. |
Returns
| Type | Description |
|---|---|
| UiOption | A new UiOption instance configured as a string option. |
CreateUiOption(UiOption)
Creates a UiOption instance based on the provided option and game settings.
Declaration
public UiOption CreateUiOption(UiOption option)
Parameters
| Type | Name | Description |
|---|---|---|
| UiOption | option | The UiOption template to base the new option on. |
Returns
| Type | Description |
|---|---|
| UiOption | A new UiOption instance. |