Table of Contents

Class DependencyInjectionReceiveEndpointExtensions

Namespace
MassTransit
Assembly
MassTransit.ExtensionsDependencyInjectionIntegration.dll
public static class DependencyInjectionReceiveEndpointExtensions
Inheritance
DependencyInjectionReceiveEndpointExtensions
Inherited Members

Methods

CompensateActivityHost<TActivity, TLog>(IReceiveEndpointConfigurator, IServiceProvider, Action<ICompensateActivityConfigurator<TActivity, TLog>>)

public static void CompensateActivityHost<TActivity, TLog>(this IReceiveEndpointConfigurator configurator, IServiceProvider provider, Action<ICompensateActivityConfigurator<TActivity, TLog>> configure = null) where TActivity : class, ICompensateActivity<TLog> where TLog : class

Parameters

configurator IReceiveEndpointConfigurator
provider IServiceProvider
configure Action<ICompensateActivityConfigurator<TActivity, TLog>>

Type Parameters

TActivity
TLog

ConnectConsumer<TConsumer>(IConsumePipeConnector, IServiceProvider, params IPipeSpecification<ConsumerConsumeContext<TConsumer>>[])

Connect a consumer to the bus/mediator

public static ConnectHandle ConnectConsumer<TConsumer>(this IConsumePipeConnector connector, IServiceProvider provider, params IPipeSpecification<ConsumerConsumeContext<TConsumer>>[] pipeSpecifications) where TConsumer : class, IConsumer

Parameters

connector IConsumePipeConnector
provider IServiceProvider
pipeSpecifications IPipeSpecification<ConsumerConsumeContext<TConsumer>>[]

Returns

ConnectHandle

Type Parameters

TConsumer

Consumer<T>(IReceiveEndpointConfigurator, IServiceProvider, Action<IConsumerConfigurator<T>>)

Registers a consumer given the lifetime scope specified

public static void Consumer<T>(this IReceiveEndpointConfigurator configurator, IServiceProvider provider, Action<IConsumerConfigurator<T>> configure = null) where T : class, IConsumer

Parameters

configurator IReceiveEndpointConfigurator

The service bus configurator

provider IServiceProvider

The LifetimeScope of the provider

configure Action<IConsumerConfigurator<T>>

Type Parameters

T

The consumer type

Consumer<TConsumer, TMessage>(IBatchConfigurator<TMessage>, IServiceProvider, Action<IConsumerMessageConfigurator<TConsumer, Batch<TMessage>>>)

Connect a consumer with a consumer factory method

public static void Consumer<TConsumer, TMessage>(this IBatchConfigurator<TMessage> configurator, IServiceProvider provider, Action<IConsumerMessageConfigurator<TConsumer, Batch<TMessage>>> configure = null) where TConsumer : class, IConsumer<Batch<TMessage>> where TMessage : class

Parameters

configurator IBatchConfigurator<TMessage>
provider IServiceProvider
configure Action<IConsumerMessageConfigurator<TConsumer, Batch<TMessage>>>

Type Parameters

TConsumer
TMessage

ExecuteActivityHost<TActivity, TArguments>(IReceiveEndpointConfigurator, IServiceProvider, Action<IExecuteActivityConfigurator<TActivity, TArguments>>)

public static void ExecuteActivityHost<TActivity, TArguments>(this IReceiveEndpointConfigurator configurator, IServiceProvider provider, Action<IExecuteActivityConfigurator<TActivity, TArguments>> configure = null) where TActivity : class, IExecuteActivity<TArguments> where TArguments : class

Parameters

configurator IReceiveEndpointConfigurator
provider IServiceProvider
configure Action<IExecuteActivityConfigurator<TActivity, TArguments>>

Type Parameters

TActivity
TArguments

ExecuteActivityHost<TActivity, TArguments>(IReceiveEndpointConfigurator, Uri, IServiceProvider, Action<IExecuteActivityConfigurator<TActivity, TArguments>>)

public static void ExecuteActivityHost<TActivity, TArguments>(this IReceiveEndpointConfigurator configurator, Uri compensateAddress, IServiceProvider provider, Action<IExecuteActivityConfigurator<TActivity, TArguments>> configure = null) where TActivity : class, IExecuteActivity<TArguments> where TArguments : class

Parameters

configurator IReceiveEndpointConfigurator
compensateAddress Uri
provider IServiceProvider
configure Action<IExecuteActivityConfigurator<TActivity, TArguments>>

Type Parameters

TActivity
TArguments

Saga<T>(IReceiveEndpointConfigurator, IServiceProvider, Action<ISagaConfigurator<T>>)

Registers a saga using the container that has the repository resolved from the container

public static void Saga<T>(this IReceiveEndpointConfigurator configurator, IServiceProvider provider, Action<ISagaConfigurator<T>> configure = null) where T : class, ISaga

Parameters

configurator IReceiveEndpointConfigurator
provider IServiceProvider
configure Action<ISagaConfigurator<T>>

Type Parameters

T

StateMachineSaga<TInstance>(IReceiveEndpointConfigurator, SagaStateMachine<TInstance>, IServiceProvider, Action<ISagaConfigurator<TInstance>>)

Subscribe a state machine saga to the endpoint

public static void StateMachineSaga<TInstance>(this IReceiveEndpointConfigurator configurator, SagaStateMachine<TInstance> stateMachine, IServiceProvider serviceProvider, Action<ISagaConfigurator<TInstance>> configure = null) where TInstance : class, SagaStateMachineInstance

Parameters

configurator IReceiveEndpointConfigurator
stateMachine SagaStateMachine<TInstance>
serviceProvider IServiceProvider

The Container reference to resolve the repository

configure Action<ISagaConfigurator<TInstance>>

Optionally configure the saga

Type Parameters

TInstance

The state machine instance type

StateMachineSaga<TInstance>(IReceiveEndpointConfigurator, IServiceProvider, Action<ISagaConfigurator<TInstance>>)

Subscribe a state machine saga to the endpoint

public static void StateMachineSaga<TInstance>(this IReceiveEndpointConfigurator configurator, IServiceProvider provider, Action<ISagaConfigurator<TInstance>> configure = null) where TInstance : class, SagaStateMachineInstance

Parameters

configurator IReceiveEndpointConfigurator
provider IServiceProvider

The Container reference to resolve the repository

configure Action<ISagaConfigurator<TInstance>>

Optionally configure the saga

Type Parameters

TInstance

The state machine instance type