Class UnityViewBrowserService
Unity-specific implementation of view browser service for managing view navigation history.
Namespace: Serenity.ViewBrowser.Infrastructure.Services
Assembly: Serenity.UnityViewBrowser.Infrastructure.dll
Syntax
public class UnityViewBrowserService : MonoBehaviour, IViewBrowserService, IFoundationSettings
Constructors
UnityViewBrowserService()
Declaration
public UnityViewBrowserService()
Fields
Guid
Declaration
public string Guid
Field Value
| Type | Description |
|---|---|
| string |
Id
Declaration
public string Id
Field Value
| Type | Description |
|---|---|
| string |
Methods
ClearHistory()
Clears all views from the navigation history.
Declaration
public void ClearHistory()
GetCurrentView()
Gets the currently active view from the top of the history stack.
Declaration
public IViewBase GetCurrentView()
Returns
| Type | Description |
|---|---|
| IViewBase | The current view if history is not empty, null otherwise. |
GetHistory()
Gets the complete navigation history as a list of views.
Declaration
public List<IViewBase> GetHistory()
Returns
| Type | Description |
|---|---|
| List<IViewBase> | A list containing all views in the navigation history. |
GoBack()
Navigates back to the previous view in the history stack.
Declaration
public IViewBase GoBack()
Returns
| Type | Description |
|---|---|
| IViewBase | The view that was navigated back to. |
Exceptions
| Type | Condition |
|---|---|
| Exception | Thrown when there are no views to go back to. |
Push(ViewBrowserPushInput)
Pushes a new view onto the navigation history stack.
Declaration
public IViewBase Push(ViewBrowserPushInput input)
Parameters
| Type | Name | Description |
|---|---|---|
| ViewBrowserPushInput | input | The input data containing the view to push onto the stack. |
Returns
| Type | Description |
|---|---|
| IViewBase | The view that was pushed onto the stack. |