Interface IMenuInstanceGate
Narrow runtime port that guarantees a menu's visual instance exists before it is shown.
Implemented by the menu runtime (e.g. the Unity menu service) so orchestration code — such as
the menu transition decorator — can resolve lazily-instantiated menus without taking a
dependency on Unity or on the concrete service.
Namespace: Serenity.Menu.Application.Interfaces.Services
Assembly: Serenity.Menu.Application.dll
Syntax
public interface IMenuInstanceGate
Remarks
Deliberately single-method and Unity-free. Do not add other members or expose Unity concepts here.
Methods
EnsureMenu(string)
Ensures the menu identified by menuId has a built, cached visual instance.
Idempotent: a menu that is already built returns true without rebuilding; a registered
lazy menu is built once and cached; an unknown menu id fails loudly.
Declaration
bool EnsureMenu(string menuId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | menuId | The id of the menu whose visual instance must exist. |
Returns
| Type | Description |
|---|---|
| bool |
|