logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class DefaultCascadeMenuContext

    Default, game-agnostic ICascadeMenuContext for SO-authored cascade views. It lets a static cascade (a OptionsCascadeMenu tree) run with no game code:

    • Localize(string) passes keys through verbatim.
    • IsConditionMet(string) defaults to true (ungated entries are enabled).
    • GetEntries(string) returns nothing and warns — dynamic/target cascades need a game-supplied context that resolves their runtime sources.
    • Resolve(object) dispatches the leaf's optional EventDispatcherSignal (carried as the resolved selection) then asks the host view to return to its opener.
    Inheritance
    object
    DefaultCascadeMenuContext
    Implements
    ICascadeMenuContext
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Menu.Infrastructure.Cascade
    Assembly: Serenity.UnityMenu.Infrastructure.dll
    Syntax
    public sealed class DefaultCascadeMenuContext : ICascadeMenuContext

    Constructors

    DefaultCascadeMenuContext(IEventDispatcherService, ILogService, Action)

    Creates the default context.

    Declaration
    public DefaultCascadeMenuContext(IEventDispatcherService eventDispatcherService, ILogService logService, Action onResolved)
    Parameters
    Type Name Description
    IEventDispatcherService eventDispatcherService

    Dispatcher used to fire a leaf's optional signal.

    ILogService logService

    Logging service (selection trace + dynamic-source warnings).

    Action onResolved

    Callback the host view uses to close the cascade and return to its opener.

    Methods

    Dispatch(object)

    Declaration
    public void Dispatch(object selection)
    Parameters
    Type Name Description
    object selection

    GetEntries(string)

    Declaration
    public IReadOnlyList<CascadeDynamicEntry> GetEntries(string sourceId)
    Parameters
    Type Name Description
    string sourceId
    Returns
    Type Description
    IReadOnlyList<CascadeDynamicEntry>

    GetSelection(string)

    Declaration
    public object GetSelection(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    object

    IsConditionMet(string)

    Declaration
    public bool IsConditionMet(string conditionId)
    Parameters
    Type Name Description
    string conditionId
    Returns
    Type Description
    bool

    Localize(string)

    Declaration
    public string Localize(string key)
    Parameters
    Type Name Description
    string key
    Returns
    Type Description
    string

    Resolve(object)

    Declaration
    public void Resolve(object selection)
    Parameters
    Type Name Description
    object selection

    SetSelection(string, object)

    Declaration
    public void SetSelection(string key, object value)
    Parameters
    Type Name Description
    string key
    object value

    Implements

    ICascadeMenuContext
    In this article
    © 2026 Serenity. All Rights Reserved