logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityCompositeViewService

    Registry and coordinator for composite views. It owns the built composites, shows/hides them, and listens for OnActivateCompositeViewChildSignal — the signal a navigation rail option fires on submit — delegating to CompositeViewActivateChild so the matching composite swaps its content. Mirrors the role the menu service plays for menus.

    Inheritance
    object
    UnityCompositeViewService
    Implements
    ICompositeViewService
    IService
    IFoundationSettings
    IViewProvider
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Ui.Infrastructure.Services
    Assembly: Serenity.UnityUi.Infrastructure.dll
    Syntax
    public class UnityCompositeViewService : ICompositeViewService, IService, IFoundationSettings, IViewProvider
    Remarks

    The activation flow is intentionally routed through the business use case rather than handled here, so the "selecting a nav entry swaps the content" rule lives in the application layer and stays testable without Unity. This service is the infrastructure adapter that wires the signal to it.

    Constructors

    UnityCompositeViewService(string, IEventDispatcherService, ILogService)

    Creates the service and subscribes to the child-activation signal so navigation rails work with no per-view wiring.

    Declaration
    public UnityCompositeViewService(string id, IEventDispatcherService eventDispatcherService, ILogService logService)
    Parameters
    Type Name Description
    string id

    Service id.

    IEventDispatcherService eventDispatcherService

    Event dispatcher used to receive activation signals.

    ILogService logService

    Logging service.

    Properties

    Guid

    Declaration
    public string Guid { get; set; }
    Property Value
    Type Description
    string

    Id

    Declaration
    public string Id { get; set; }
    Property Value
    Type Description
    string

    LogService

    Declaration
    public ILogService LogService { get; set; }
    Property Value
    Type Description
    ILogService

    Methods

    ActivateChild(string, string)

    Declaration
    public void ActivateChild(string compositeViewId, string childViewId)
    Parameters
    Type Name Description
    string compositeViewId
    string childViewId

    GetActiveInputView()

    Declaration
    public IViewBase GetActiveInputView()
    Returns
    Type Description
    IViewBase

    GetView(string)

    Declaration
    public ICompositeView GetView(string compositeViewId)
    Parameters
    Type Name Description
    string compositeViewId
    Returns
    Type Description
    ICompositeView

    GetViews()

    Declaration
    public IReadOnlyCollection<ICompositeView> GetViews()
    Returns
    Type Description
    IReadOnlyCollection<ICompositeView>

    HasView(string)

    True when a composite with the given id is registered. Part of IViewProvider.

    Declaration
    public bool HasView(string viewId)
    Parameters
    Type Name Description
    string viewId

    The composite id to test.

    Returns
    Type Description
    bool

    True if a composite with that id exists.

    HideView(string)

    Declaration
    public void HideView(string compositeViewId)
    Parameters
    Type Name Description
    string compositeViewId

    RegisterView(ICompositeView)

    Declaration
    public void RegisterView(ICompositeView view)
    Parameters
    Type Name Description
    ICompositeView view

    ShowView(string)

    Declaration
    public void ShowView(string compositeViewId)
    Parameters
    Type Name Description
    string compositeViewId

    Implements

    ICompositeViewService
    IService
    IFoundationSettings
    IViewProvider
    In this article
    © 2026 Serenity. All Rights Reserved