logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class ShowViewAction<TSignal>

    Base class for actions that react to a signal by showing a view id through the IViewRouter.

    Inheritance
    object
    EventDispatcherAction<TSignal>
    ShowViewAction<TSignal>
    Implements
    IEventDispatcherAction
    IDisposable
    Inherited Members
    EventDispatcherAction<TSignal>.Initialize(IEventDispatcherService)
    EventDispatcherAction<TSignal>.Dispose()
    EventDispatcherAction<TSignal>.OnInitialized()
    EventDispatcherAction<TSignal>.OnDisposed()
    EventDispatcherAction<TSignal>.TryResolveService<TService>(out TService)
    EventDispatcherAction<TSignal>.LogInfo(string)
    EventDispatcherAction<TSignal>.LogWarning(string)
    EventDispatcherAction<TSignal>.LogError(string)
    EventDispatcherAction<TSignal>.SignalType
    EventDispatcherAction<TSignal>.LogCategory
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Global.Application.Events
    Assembly: Serenity.Global.Application.dll
    Syntax
    public abstract class ShowViewAction<TSignal> : EventDispatcherAction<TSignal>, IEventDispatcherAction, IDisposable where TSignal : EventDispatcherSignal
    Type Parameters
    Name Description
    TSignal

    The type of signal this action responds to.

    Remarks

    Uses ServiceLocatorBridge (via the base class' TryResolveService) to obtain the IViewRouter, since EventDispatcher actions are instantiated via reflection and cannot receive constructor injection. Never throws: an unresolved router or an empty view id logs a warning and returns, matching the framework's never-throw-in-runtime philosophy.

    Constructors

    ShowViewAction()

    Declaration
    protected ShowViewAction()

    Methods

    Execute(TSignal)

    Reacts to the signal by showing its resolved view id via the IViewRouter.

    Declaration
    protected override sealed void Execute(TSignal signal)
    Parameters
    Type Name Description
    TSignal signal

    The signal being reacted to.

    Overrides
    EventDispatcherAction<TSignal>.Execute(TSignal)

    ResolveViewId(TSignal)

    Resolves the view id to show for the given signal.

    Declaration
    protected abstract string ResolveViewId(TSignal signal)
    Parameters
    Type Name Description
    TSignal signal

    The signal being reacted to.

    Returns
    Type Description
    string

    The id of the view to show.

    Implements

    IEventDispatcherAction
    IDisposable
    In this article
    © 2026 Serenity. All Rights Reserved