Table of Contents

AddNatsCommandQueue Method

Definition

Namespace
Savvyio.Extensions.DependencyInjection.NATS
Assemblies
Savvyio.Extensions.DependencyInjection.NATS.dll
Source
src/Savvyio.Extensions.DependencyInjection.NATS/ServiceCollectionExtensions.cs

AddNatsCommandQueue(IServiceCollection, Action<NatsCommandQueueOptions>, Action<ServiceOptions>)

Adds an NatsCommandQueue implementation to the specified IServiceCollection.

public static IServiceCollection AddNatsCommandQueue(this IServiceCollection services, Action<NatsCommandQueueOptions> natsSetup, Action<ServiceOptions> serviceSetup = null)

Parameters

services IServiceCollection

The IServiceCollection to extend.

natsSetup Action<NatsCommandQueueOptions>

The NatsCommandQueueOptions that needs to be configured.

serviceSetup Action<ServiceOptions>

The ServiceOptions which may be configured.

Returns

IServiceCollection

A reference to services so that additional calls can be chained.

Remarks

The implementation will be type forwarded accordingly.

Exceptions

ArgumentNullException

services cannot be null.

AddNatsCommandQueue<TMarker>(IServiceCollection, Action<NatsCommandQueueOptions<TMarker>>, Action<ServiceOptions>)

Adds an NatsCommandQueue<TMarker> implementation to the specified IServiceCollection.

public static IServiceCollection AddNatsCommandQueue<TMarker>(this IServiceCollection services, Action<NatsCommandQueueOptions<TMarker>> natsSetup, Action<ServiceOptions> serviceSetup = null)

Parameters

services IServiceCollection

The IServiceCollection to extend.

natsSetup Action<NatsCommandQueueOptions<TMarker>>

The NatsCommandQueueOptions<TMarker> that needs to be configured.

serviceSetup Action<ServiceOptions>

The ServiceOptions which may be configured.

Returns

IServiceCollection

A reference to services so that additional calls can be chained.

Type Parameters

TMarker

Remarks

The implementation will be type forwarded accordingly.

Exceptions

ArgumentNullException

services cannot be null.