Table of Contents

Method AddMediarion

Namespace
Mediarion
Assembly
Mediarion.Extensions.DependencyInjection.dll

AddMediarion(IServiceCollection, Action<MediarionServiceConfiguration>)

Registers the mediator and every handler in the assemblies the configuration names.

[RequiresUnreferencedCode("Handlers are found by walking the types in an assembly.")]
[RequiresDynamicCode("Handlers are registered against generics closed at run time.")]
public static IServiceCollection AddMediarion(this IServiceCollection services, Action<MediarionServiceConfiguration> configure)

Parameters

services IServiceCollection

The container.

configure Action<MediarionServiceConfiguration>

What to register.

Returns

IServiceCollection

The container, to carry on configuring.

AddMediarion(IServiceCollection, params Assembly[])

Registers the mediator and every handler in the given assemblies.

[RequiresUnreferencedCode("Handlers are found by walking the types in an assembly.")]
[RequiresDynamicCode("Handlers are registered against generics closed at run time.")]
public static IServiceCollection AddMediarion(this IServiceCollection services, params Assembly[] assemblies)

Parameters

services IServiceCollection

The container.

assemblies Assembly[]

The assemblies to scan.

Returns

IServiceCollection

The container, to carry on configuring.