Class StateMachineExtensions
- Namespace
- Automatonymous
- Assembly
- Automatonymous.dll
public static class StateMachineExtensions
- Inheritance
-
StateMachineExtensions
- Inherited Members
Methods
TransitionToState<TInstance>(StateMachine<TInstance>, TInstance, State, CancellationToken)
Transition a state machine instance to a specific state, producing any events related to the transaction such as leaving the previous state and entering the target state
public static Task TransitionToState<TInstance>(this StateMachine<TInstance> machine, TInstance instance, State state, CancellationToken cancellationToken = default) where TInstance : class
Parameters
machineStateMachine<TInstance>The state machine
instanceTInstanceThe state instance
stateStateThe target state
cancellationTokenCancellationToken
Returns
Type Parameters
TInstanceThe state instance type