Interface StateMachine<TSaga>
- Namespace
- MassTransit
- Assembly
- MassTransit.Abstractions.dll
A defined state machine that operations against the specified instance
public interface StateMachine<TSaga> : StateMachine, IVisitable, IProbeSite where TSaga : class, ISaga
Type Parameters
TSaga
- Inherited Members
- Extension Methods
Properties
Accessor
Exposes the current state on the given instance
IStateAccessor<TSaga> Accessor { get; }
Property Value
- IStateAccessor<TSaga>
Methods
ConnectEventObserver(Event, IEventObserver<TSaga>)
IDisposable ConnectEventObserver(Event @event, IEventObserver<TSaga> observer)
Parameters
eventEventobserverIEventObserver<TSaga>
Returns
ConnectEventObserver(IEventObserver<TSaga>)
IDisposable ConnectEventObserver(IEventObserver<TSaga> observer)
Parameters
observerIEventObserver<TSaga>
Returns
ConnectStateObserver(IStateObserver<TSaga>)
IDisposable ConnectStateObserver(IStateObserver<TSaga> observer)
Parameters
observerIStateObserver<TSaga>
Returns
GetState(string)
Returns the state requested bound to the instance
State<TSaga> GetState(string name)
Parameters
namestring
Returns
- State<TSaga>
RaiseEvent(BehaviorContext<TSaga>)
Raise a simple event on the state machine instance asynchronously
Task RaiseEvent(BehaviorContext<TSaga> context)
Parameters
contextBehaviorContext<TSaga>
Returns
- Task
Task for the instance once completed
RaiseEvent<T>(BehaviorContext<TSaga, T>)
Raise a data event on the state machine instance
Task RaiseEvent<T>(BehaviorContext<TSaga, T> context) where T : class
Parameters
contextBehaviorContext<TSaga, T>
Returns
Type Parameters
T