Class UnityMenuPresenter
Unity-specific presenter for menu system, handling view model interactions and menu operations.
Namespace: Serenity.Menu.InterfaceAdapters.Presenters
Assembly: Serenity.UnityMenu.InterfaceAdapters.dll
Syntax
public class UnityMenuPresenter : UnityUiPresenter, IMenuPresenter, IUiPresenter
Constructors
UnityMenuPresenter(Dictionary<string, IViewModel>)
Initializes a new Unity menu presenter with the specified view models.
Declaration
public UnityMenuPresenter(Dictionary<string, IViewModel> viewModels)
Parameters
| Type | Name | Description |
|---|---|---|
| Dictionary<string, IViewModel> | viewModels | A dictionary of view models keyed by their identifiers. |
Methods
Cancel(MenuCancelInput)
Cancels the current menu operation for the specified menu.
Declaration
public void Cancel(MenuCancelInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| MenuCancelInput | input | The input data containing the menu identifier to cancel. |
ChangeOptionValue(MenuChangeOptionValueInput)
Changes the value of a specific option in the specified menu.
Declaration
public void ChangeOptionValue(MenuChangeOptionValueInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| MenuChangeOptionValueInput | input | The input data containing menu ID, option ID, and new value. |
SelectOption(MenuSelectOptionInput)
Selects an option at the specified index in the menu.
Declaration
public void SelectOption(MenuSelectOptionInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| MenuSelectOptionInput | input | The input data containing menu ID and option index to select. |
SubmitOption(MenuSubmitOptionInput)
Submits the currently selected option in the specified menu.
Declaration
public void SubmitOption(MenuSubmitOptionInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| MenuSubmitOptionInput | input | The input data containing the menu identifier for submission. |