Interface IMenuNavigationLookup
The engine-agnostic surface MenuReachabilityWalker needs to resolve a view id into whatever it actually is: a menu, a known non-menu view of some ViewKind (a composite, a cascade, a leaderboard, an achievements view, …), or nothing known at all. Kept separate from the concrete registries that hold menus and views so the walker can run in a pure unit test with a fake, and in the editor wizard against the project's real catalogs.
Namespace: Serenity.Menu.Application.Navigation
Assembly: Serenity.Menu.Application.dll
Syntax
public interface IMenuNavigationLookup
Methods
GetHostedMenuIds(string)
Gets the menu ids hosted inside the given view (for example, the menus a composite view hosts as children).
Declaration
IReadOnlyList<string> GetHostedMenuIds(string viewId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | viewId | The hosting view's id. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> | The hosted menu ids, or an empty list when |
GetOutboundEdges(string)
Gets the edges a non-menu view declares outward on its own — a cascade's, a leaderboard's
or an achievements view's ReturnViewId, and a leaderboard's SHOW_VIEW button targets. Empty
for a menu, whose outbound edges are its own TRANSITION options instead.
Declaration
IReadOnlyList<NavigationEdge> GetOutboundEdges(string viewId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | viewId | The view id to look up. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<NavigationEdge> | The declared edges, or an empty list when |
TryGetMenu(string, out IMenuSettingsDefinition)
Resolves a view id to the menu definition it names.
Declaration
bool TryGetMenu(string viewId, out IMenuSettingsDefinition menu)
Parameters
| Type | Name | Description |
|---|---|---|
| string | viewId | The id to resolve. |
| IMenuSettingsDefinition | menu | The resolved menu, when found. |
Returns
| Type | Description |
|---|---|
| bool | True when |
TryGetViewKind(string, out ViewKind)
Resolves a view id to the kind of view it names — Menu included, so a caller that only needs the classification never has to call TryGetMenu(string, out IMenuSettingsDefinition) first.
Declaration
bool TryGetViewKind(string viewId, out ViewKind kind)
Parameters
| Type | Name | Description |
|---|---|---|
| string | viewId | The id to resolve. |
| ViewKind | kind | The resolved kind, when found. |
Returns
| Type | Description |
|---|---|
| bool | True when |