Interface IBehavior<TSaga, TMessage>
- Namespace
- MassTransit
- Assembly
- MassTransit.Abstractions.dll
A behavior is a chain of activities invoked by a state
public interface IBehavior<TSaga, in TMessage> : IVisitable, IProbeSite where TSaga : class, ISaga where TMessage : class
Type Parameters
TSaga
The state type
TMessage
The data type of the behavior
- Inherited Members
Methods
Execute(BehaviorContext<TSaga, TMessage>)
Execute the activity with the given behavior context
Task Execute(BehaviorContext<TSaga, in TMessage> context)
Parameters
context
BehaviorContext<TSaga, TMessage>The behavior context
Returns
- Task
An awaitable task
Faulted<TException>(BehaviorExceptionContext<TSaga, TMessage, TException>)
The exception path through the behavior allows activities to catch and handle exceptions
Task Faulted<TException>(BehaviorExceptionContext<TSaga, in TMessage, TException> context) where TException : Exception
Parameters
context
BehaviorExceptionContext<TSaga, TMessage, TException>
Returns
Type Parameters
TException