Table of Contents

Interface IBehavior<TInstance>

Namespace
MassTransit
Assembly
MassTransit.Abstractions.dll

A behavior is a chain of activities invoked by a state

public interface IBehavior<TInstance> : IVisitable, IProbeSite where TInstance : class, ISaga

Type Parameters

TInstance

The state type

Inherited Members

Methods

Execute(BehaviorContext<TInstance>)

Execute the activity with the given behavior context

Task Execute(BehaviorContext<TInstance> context)

Parameters

context BehaviorContext<TInstance>

The behavior context

Returns

Task

An awaitable task

Execute<T>(BehaviorContext<TInstance, T>)

Execute the activity with the given behavior context

Task Execute<T>(BehaviorContext<TInstance, T> context) where T : class

Parameters

context BehaviorContext<TInstance, T>

The behavior context

Returns

Task

An awaitable task

Type Parameters

T

Faulted<TException>(BehaviorExceptionContext<TInstance, TException>)

The exception path through the behavior allows activities to catch and handle exceptions

Task Faulted<TException>(BehaviorExceptionContext<TInstance, TException> context) where TException : Exception

Parameters

context BehaviorExceptionContext<TInstance, TException>

Returns

Task

Type Parameters

TException

Faulted<T, TException>(BehaviorExceptionContext<TInstance, T, TException>)

The exception path through the behavior allows activities to catch and handle exceptions

Task Faulted<T, TException>(BehaviorExceptionContext<TInstance, T, TException> context) where T : class where TException : Exception

Parameters

context BehaviorExceptionContext<TInstance, T, TException>

Returns

Task

Type Parameters

T
TException