Table of Contents

AddMarshaller Method

Definition

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

AddMarshaller<TService>(IServiceCollection, Action<ServiceOptions>)

Adds an implementation of IMarshaller to the specified IServiceCollection.

public static IServiceCollection AddMarshaller<TService>(this IServiceCollection services, Action<ServiceOptions> setup = null) where TService : class, IMarshaller

Parameters

services IServiceCollection

The IServiceCollection to add the service to.

setup Action<ServiceOptions>

The ServiceOptions which may be configured.

Returns

IServiceCollection

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

Type Parameters

TService

The type of the IMarshaller to add.

Exceptions

ArgumentNullException

services cannot be null.

AddMarshaller<TService>(IServiceCollection, Func<IServiceProvider, TService>, Action<ServiceOptions>)

Adds an implementation of IMarshaller to the specified IServiceCollection.

public static IServiceCollection AddMarshaller<TService>(this IServiceCollection services, Func<IServiceProvider, TService> implementationFactory, Action<ServiceOptions> setup = null) where TService : class, IMarshaller

Parameters

services IServiceCollection

The IServiceCollection to add the service to.

implementationFactory Func<IServiceProvider, TService>

The function delegate that creates the service.

setup Action<ServiceOptions>

The ServiceOptions which may be configured.

Returns

IServiceCollection

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

Type Parameters

TService

The type of the IMarshaller to add.

Exceptions

ArgumentNullException

services cannot be null -or- implementationFactory cannot be null.