logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class CompositeViewServiceResolver

    Lazily resolves (and caches) the composite-view service from the runtime service locator. The composite-view service is created after the menu module (menus install before composites), so it may be unavailable on the first calls; this keeps retrying until it resolves, then caches it. The single owner of that retry rule — the menu controller and the menu view both resolve through this instead of each re-implementing it.

    Inheritance
    object
    CompositeViewServiceResolver
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Menu.Infrastructure.Services
    Assembly: Serenity.UnityMenu.Infrastructure.dll
    Syntax
    public sealed class CompositeViewServiceResolver
    Remarks

    The menu module deliberately PULLS the composite focus state (GetActiveInputView()) on input events rather than subscribing to focus-change pushes: focus mutates in many places inside the composite (show, child activation, cross-menu traversal), and a push model would replicate that state here with every mutation point as an event source. Querying on demand keeps a single source of truth.

    Constructors

    CompositeViewServiceResolver()

    Declaration
    public CompositeViewServiceResolver()

    Methods

    Resolve()

    The composite-view service, or null while none is registered yet.

    Declaration
    public ICompositeViewService Resolve()
    Returns
    Type Description
    ICompositeViewService

    The cached service once available; null before that.

    In this article
    © 2026 Serenity. All Rights Reserved