Class ShowViewAction<TSignal>
Base class for actions that react to a signal by showing a view id through the IViewRouter.
Inherited Members
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
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. |