logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityMenuViewInstanceFactory

    Default IUnityMenuViewInstanceFactory implementation.
    Wraps the existing IMenuViewFactory and reproduces, verbatim, the per-menu visual construction sequence that previously lived inline in UnityMenuInstaller.InstallViews: create the view, then call ExecuteHideMenu().
    No options, view-models, presenter, or service-initialization concerns are handled here.

    Inheritance
    object
    UnityMenuViewInstanceFactory
    Implements
    IUnityMenuViewInstanceFactory
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Menu.Infrastructure.Views.Factories
    Assembly: Serenity.UnityMenu.Infrastructure.dll
    Syntax
    public class UnityMenuViewInstanceFactory : IUnityMenuViewInstanceFactory

    Constructors

    UnityMenuViewInstanceFactory(IMenuViewFactory)

    Initializes a new instance of UnityMenuViewInstanceFactory.

    Declaration
    public UnityMenuViewInstanceFactory(IMenuViewFactory menuViewFactory)
    Parameters
    Type Name Description
    IMenuViewFactory menuViewFactory

    The menu view factory used to build the view; must not be null.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown when menuViewFactory is null.

    Methods

    CreateHiddenView(IMenuServiceSettingsDefinition, IMenuSettingsDefinition, Dictionary<string, UiOption[]>, object, MenuUseCases, IViewModel, IViewBrowserService, IEventDispatcherService, List<IFoundationActionDefinition>, string, IUiThemeDefinition)

    Creates the Unity menu view and applies the initial hide, in exactly the same order the installer uses today: CreateView(...) followed by ExecuteHideMenu().
    The signal behaviour of that sequence is preserved (the trailing hide dispatches the menu's OnHide lifecycle signals once, as it does during eager installation).

    Declaration
    public IViewBase CreateHiddenView(IMenuServiceSettingsDefinition menuServiceSettings, IMenuSettingsDefinition menuSettings, Dictionary<string, UiOption[]> uiOptions, object canvas, MenuUseCases menuUseCases, IViewModel viewModel, IViewBrowserService viewBrowserService, IEventDispatcherService eventDispatcherService, List<IFoundationActionDefinition> menuActions, string audioServiceId, IUiThemeDefinition theme)
    Parameters
    Type Name Description
    IMenuServiceSettingsDefinition menuServiceSettings

    The menu service settings definition to be used by the view.

    IMenuSettingsDefinition menuSettings

    The menu settings definition to be used by the view.

    Dictionary<string, UiOption[]> uiOptions

    The complete dictionary of UI options keyed by menu identifier, as prepared by the installer.

    object canvas

    The canvas object where the view will be rendered.

    MenuUseCases menuUseCases

    The menu use cases to be utilized by the view.

    IViewModel viewModel

    The view model instance to be associated with the view.

    IViewBrowserService viewBrowserService

    The view browser service for managing view navigation.

    IEventDispatcherService eventDispatcherService

    The event dispatcher service for handling events.

    List<IFoundationActionDefinition> menuActions

    A list of foundation action definitions associated with the menu.

    string audioServiceId

    The identifier for the audio service to be used by the view.

    IUiThemeDefinition theme

    The UI theme definition to be applied to the view.

    Returns
    Type Description
    IViewBase

    The created menu view instance, already hidden.

    Implements

    IUnityMenuViewInstanceFactory
    In this article
    © 2026 Serenity. All Rights Reserved