Class AddScoreAction
Action that reacts to AddScoreSignal by adding its delta to the signaled metric through the IScoreService.
Namespace: Serenity.Score.Application.Events
Assembly: Serenity.Score.Application.dll
Syntax
public sealed class AddScoreAction : EventDispatcherAction<AddScoreSignal>
Remarks
Uses ServiceLocatorBridge (via the base
class' TryResolveService) to obtain the IScoreService since EventDispatcher
actions are instantiated via reflection and cannot receive constructor injection. Never throws:
an unresolved service, a blank key or an unregistered key each log a warning and return without
adding — an unregistered-key Add is a silent no-op on IScoreService itself,
so this action is the one place that makes it visible. The per-key warn-once latch assumes the
boot installer creates exactly one AddScoreAction instance, as every
AutoRegisterEventActionAttribute action is constructed once and reused for the
life of the dispatcher.
Constructors
AddScoreAction()
Declaration
public AddScoreAction()
Methods
Execute(AddScoreSignal)
Reacts to the AddScoreSignal by adding its delta to the signaled metric.
Declaration
protected override void Execute(AddScoreSignal signal)
Parameters
| Type | Name | Description |
|---|---|---|
| AddScoreSignal | signal | The AddScore signal. |