Skip to content

JournaledGrain<TGrainState, TEventBase>.TransitionState(TGrainState, TEventBase)

TransitionState(TGrainState, TEventBase)

virtual
View source
protected virtual void JournaledGrain<TGrainState, TransitionState(TGrainState state, TEventBase @event)
Defines how to apply events to the state. Unless it is overridden in the subclass, it calls a dynamic "Apply" function on the state, with the event as a parameter. All exceptions thrown by this method are caught and logged by the log view provider.

Override this to customize how to transition the state for a given event.

Parameters

stateTGrainState
The state.
eventTEventBase
The event.