Table of Contents

Method AddBehavior

Namespace
Mediarion
Assembly
Mediarion.Extensions.DependencyInjection.dll

AddBehavior(Type)

Adds a pipeline behaviour, which may be an open generic.

public MediarionServiceConfiguration AddBehavior(Type behaviourType)

Parameters

behaviourType Type

The behaviour type.

Returns

MediarionServiceConfiguration

This, to carry on configuring.

Remarks

Behaviours run in the order they are added, outermost first.

AddBehavior<TBehaviour>()

Adds a pipeline behaviour.

public MediarionServiceConfiguration AddBehavior<TBehaviour>()

Returns

MediarionServiceConfiguration

This, to carry on configuring.

Type Parameters

TBehaviour

The behaviour type.

AddBehavior(Type, ServiceLifetime)

Adds a pipeline behaviour with a lifetime of its own.

public MediarionServiceConfiguration AddBehavior(Type behaviourType, ServiceLifetime lifetime)

Parameters

behaviourType Type

The behaviour type, which may be an open generic.

lifetime ServiceLifetime

How long an instance lives.

Returns

MediarionServiceConfiguration

This, to carry on configuring.

AddBehavior(Type, Type)

Adds a pipeline behaviour against the one contract named.

public MediarionServiceConfiguration AddBehavior(Type serviceType, Type implementationType)

Parameters

serviceType Type

The contract to register it against.

implementationType Type

The behaviour type.

Returns

MediarionServiceConfiguration

This, to carry on configuring.

Remarks

Without this, a behaviour is registered against every IPipelineBehavior it implements. Naming the contract is how one that implements several is put in front of one request and not the rest.

AddBehavior(Type, Type, ServiceLifetime)

Adds a pipeline behaviour against the one contract named, with a lifetime.

public MediarionServiceConfiguration AddBehavior(Type serviceType, Type implementationType, ServiceLifetime lifetime)

Parameters

serviceType Type

The contract to register it against.

implementationType Type

The behaviour type.

lifetime ServiceLifetime

How long an instance lives.

Returns

MediarionServiceConfiguration

This, to carry on configuring.

AddBehavior<TBehaviour>(ServiceLifetime)

Adds a pipeline behaviour with a lifetime of its own.

public MediarionServiceConfiguration AddBehavior<TBehaviour>(ServiceLifetime lifetime)

Parameters

lifetime ServiceLifetime

How long an instance lives.

Returns

MediarionServiceConfiguration

This, to carry on configuring.

Type Parameters

TBehaviour

The behaviour type.

AddBehavior<TService, TImplementation>()

Adds a pipeline behaviour against the one contract named.

public MediarionServiceConfiguration AddBehavior<TService, TImplementation>()

Returns

MediarionServiceConfiguration

This, to carry on configuring.

Type Parameters

TService

The contract to register it against.

TImplementation

The behaviour type.

AddBehavior<TService, TImplementation>(ServiceLifetime)

Adds a pipeline behaviour against the one contract named, with a lifetime.

public MediarionServiceConfiguration AddBehavior<TService, TImplementation>(ServiceLifetime lifetime)

Parameters

lifetime ServiceLifetime

How long an instance lives.

Returns

MediarionServiceConfiguration

This, to carry on configuring.

Type Parameters

TService

The contract to register it against.

TImplementation

The behaviour type.