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
behaviourTypeTypeThe 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
TBehaviourThe behaviour type.
AddBehavior(Type, ServiceLifetime)
Adds a pipeline behaviour with a lifetime of its own.
public MediarionServiceConfiguration AddBehavior(Type behaviourType, ServiceLifetime lifetime)
Parameters
behaviourTypeTypeThe behaviour type, which may be an open generic.
lifetimeServiceLifetimeHow 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
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
serviceTypeTypeThe contract to register it against.
implementationTypeTypeThe behaviour type.
lifetimeServiceLifetimeHow 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
lifetimeServiceLifetimeHow long an instance lives.
Returns
- MediarionServiceConfiguration
This, to carry on configuring.
Type Parameters
TBehaviourThe 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
TServiceThe contract to register it against.
TImplementationThe 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
lifetimeServiceLifetimeHow long an instance lives.
Returns
- MediarionServiceConfiguration
This, to carry on configuring.
Type Parameters
TServiceThe contract to register it against.
TImplementationThe behaviour type.