Table of Contents

Interface BehaviorContext<TSaga>

Namespace
MassTransit
Assembly
MassTransit.Abstractions.dll

A behavior context is an event context delivered to a behavior, including the state instance

public interface BehaviorContext<TSaga> : SagaConsumeContext<TSaga>, ConsumeContext, PipeContext, MessageContext, IPublishEndpoint, IPublishObserverConnector, ISendEndpointProvider, ISendObserverConnector where TSaga : class, ISaga

Type Parameters

TSaga

The state instance type

Inherited Members
Extension Methods

Properties

Event

Event Event { get; }

Property Value

Event

Instance

[Obsolete("Deprecated, use Saga instead")]
TSaga Instance { get; }

Property Value

TSaga

StateMachine

StateMachine<TSaga> StateMachine { get; }

Property Value

StateMachine<TSaga>

Methods

CreateProxy(Event)

Return a proxy of the current behavior context with the specified event

BehaviorContext<TSaga> CreateProxy(Event @event)

Parameters

event Event

The event for the new context

Returns

BehaviorContext<TSaga>

CreateProxy<T>(Event<T>, T)

Return a proxy of the current behavior context with the specified event and data

BehaviorContext<TSaga, T> CreateProxy<T>(Event<T> @event, T data) where T : class

Parameters

event Event<T>

The event for the new context

data T

The data for the event

Returns

BehaviorContext<TSaga, T>

Type Parameters

T

The data type

Init<T>(object)

Task<SendTuple<T>> Init<T>(object values) where T : class

Parameters

values object

Returns

Task<SendTuple<T>>

Type Parameters

T

Raise(Event)

Raise an event on the current instance, pushing the current event on the stack

Task Raise(Event @event)

Parameters

event Event

The event to raise

Returns

Task

An awaitable Task

Raise<T>(Event<T>, T)

Raise an event on the current instance, pushing the current event on the stack

Task Raise<T>(Event<T> @event, T data) where T : class

Parameters

event Event<T>

The event to raise

data T

THe event data

Returns

Task

An awaitable Task

Type Parameters

T