Show / Hide Table of Contents

Class DecoratorBasedServiceResolutionInfoBuilder

A non-generic builder which creates an instance of DecoratorBasedServiceResolutionInfo.

Inheritance
System.Object
DecoratorBasedServiceResolutionInfoBuilder
Implements
IDecoratorBuilder
ICreatesDecorator
ICustomizesDecorator
IHasDecoratorBasedServiceResolutionInfo
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CSF.DecoratorBuilder
Assembly: CSF.DecoratorBuilder.Common.dll
Syntax
public class DecoratorBasedServiceResolutionInfoBuilder : IDecoratorBuilder, ICreatesDecorator, ICustomizesDecorator, IHasDecoratorBasedServiceResolutionInfo
Remarks

Instances of this builder class must be used a maximum of once. They are not reusable.

Constructors

| Improve this Doc View Source

DecoratorBasedServiceResolutionInfoBuilder(Type, ITypedResolvable[])

Initialises a new instance of DecoratorBasedServiceResolutionInfoBuilder.

Declaration
public DecoratorBasedServiceResolutionInfoBuilder(Type serviceType, params ITypedResolvable[] globalParameters)
Parameters
Type Name Description
System.Type serviceType

The service type.

ITypedResolvable[] globalParameters

An optional collection of global parameters to be applied to every resolution.

Exceptions
Type Condition
System.ArgumentNullException

If serviceType is null.

Properties

| Improve this Doc View Source

ResolutionInfo

Gets the resolution information for the decorator-based services.

Declaration
public DecoratorBasedServiceResolutionInfo ResolutionInfo { get; }
Property Value
Type Description
DecoratorBasedServiceResolutionInfo

Methods

| Improve this Doc View Source

ThenWrapWith<TDecorator>(ITypedResolvable[])

Selects a decorator type using a generic type parameter. The implementation directly before this point in the decorator 'stack' (be it the initial implementation or a decorator itself) will be passed to the selected implementation. Thus this implementation will 'wrap' the one before it.

Declaration
public ICustomizesDecorator ThenWrapWith<TDecorator>(params ITypedResolvable[] parameters)
    where TDecorator : class
Parameters
Type Name Description
ITypedResolvable[] parameters

An optional collection of ITypedResolvable.

Returns
Type Description
ICustomizesDecorator

A customisation helper by which further implementations may be added to the decorator 'stack'.

Type Parameters
Name Description
TDecorator

The type of the concrete implementation to use as a decorator.

| Improve this Doc View Source

ThenWrapWith<TDecorator>(Func<Object, IServiceProvider, IEnumerable<ITypedResolvable>, TDecorator>, ITypedResolvable[])

Selects a decorator type using a generic type parameter. The implementation directly before this point in the decorator 'stack' (be it the initial implementation or a decorator itself) will be passed to the selected implementation. Thus this implementation will 'wrap' the one before it.

Declaration
public ICustomizesDecorator ThenWrapWith<TDecorator>(Func<object, IServiceProvider, IEnumerable<ITypedResolvable>, TDecorator> factoryFunction, params ITypedResolvable[] parameters)
    where TDecorator : class
Parameters
Type Name Description
System.Func<System.Object, System.IServiceProvider, System.Collections.Generic.IEnumerable<ITypedResolvable>, TDecorator> factoryFunction

A function which creates the instance of the decorator type.

ITypedResolvable[] parameters

An optional collection of ITypedResolvable.

Returns
Type Description
ICustomizesDecorator

A customisation helper by which further implementations may be added to the decorator 'stack'.

Type Parameters
Name Description
TDecorator

The type of the concrete implementation to use as a decorator.

| Improve this Doc View Source

ThenWrapWithType(Type, ITypedResolvable[])

Selects a decorator type. The implementation directly before this point in the decorator 'stack' (be it the initial implementation or a decorator itself) will be passed to the selected implementation. Thus this implementation will 'wrap' the one before it.

Declaration
public ICustomizesDecorator ThenWrapWithType(Type decoratorType, params ITypedResolvable[] parameters)
Parameters
Type Name Description
System.Type decoratorType

The type of the concrete implementation to use as a decorator.

ITypedResolvable[] parameters

An optional collection of ITypedResolvable.

Returns
Type Description
ICustomizesDecorator

A customisation helper by which further implementations may be added to the decorator 'stack'.

| Improve this Doc View Source

ThenWrapWithType(Type, Func<Object, IServiceProvider, IEnumerable<ITypedResolvable>, Object>, ITypedResolvable[])

Selects a decorator type. The implementation directly before this point in the decorator 'stack' (be it the initial implementation or a decorator itself) will be passed to the selected implementation. Thus this implementation will 'wrap' the one before it.

Declaration
public ICustomizesDecorator ThenWrapWithType(Type decoratorType, Func<object, IServiceProvider, IEnumerable<ITypedResolvable>, object> factoryFunction, params ITypedResolvable[] parameters)
Parameters
Type Name Description
System.Type decoratorType

The type of the concrete implementation to use as a decorator.

System.Func<System.Object, System.IServiceProvider, System.Collections.Generic.IEnumerable<ITypedResolvable>, System.Object> factoryFunction

A function which creates the instance of the decorator type.

ITypedResolvable[] parameters

An optional collection of ITypedResolvable.

Returns
Type Description
ICustomizesDecorator

A customisation helper by which further implementations may be added to the decorator 'stack'.

| Improve this Doc View Source

UsingInitialImpl<TInitialImpl>(ITypedResolvable[])

Selects the initial implementation type using a generic type parameter.

Declaration
public ICustomizesDecorator UsingInitialImpl<TInitialImpl>(params ITypedResolvable[] parameters)
    where TInitialImpl : class
Parameters
Type Name Description
ITypedResolvable[] parameters

An optional collection of ITypedResolvable.

Returns
Type Description
ICustomizesDecorator

A customisation helper by which further implementations may be added to the decorator 'stack'.

Type Parameters
Name Description
TInitialImpl

The type of the initial concrete implementation.

| Improve this Doc View Source

UsingInitialImpl<TInitialImpl>(Func<IServiceProvider, IEnumerable<ITypedResolvable>, TInitialImpl>, ITypedResolvable[])

Selects the initial implementation type using a generic type parameter.

Declaration
public ICustomizesDecorator UsingInitialImpl<TInitialImpl>(Func<IServiceProvider, IEnumerable<ITypedResolvable>, TInitialImpl> factoryFunction, params ITypedResolvable[] parameters)
    where TInitialImpl : class
Parameters
Type Name Description
System.Func<System.IServiceProvider, System.Collections.Generic.IEnumerable<ITypedResolvable>, TInitialImpl> factoryFunction

A function which creates the instance of the implementation type.

ITypedResolvable[] parameters

An optional collection of ITypedResolvable.

Returns
Type Description
ICustomizesDecorator

A customisation helper by which further implementations may be added to the decorator 'stack'.

Type Parameters
Name Description
TInitialImpl

The type of the initial concrete implementation.

| Improve this Doc View Source

UsingInitialImplType(Type, ITypedResolvable[])

Selects the initial implementation type.

Declaration
public ICustomizesDecorator UsingInitialImplType(Type initialImplType, params ITypedResolvable[] parameters)
Parameters
Type Name Description
System.Type initialImplType

The type of the initial concrete implementation.

ITypedResolvable[] parameters

An optional collection of ITypedResolvable.

Returns
Type Description
ICustomizesDecorator

A customisation helper by which further implementations may be added to the decorator 'stack'.

| Improve this Doc View Source

UsingInitialImplType(Type, Func<IServiceProvider, IEnumerable<ITypedResolvable>, Object>, ITypedResolvable[])

Selects the initial implementation type.

Declaration
public ICustomizesDecorator UsingInitialImplType(Type initialImplType, Func<IServiceProvider, IEnumerable<ITypedResolvable>, object> factoryFunction, params ITypedResolvable[] parameters)
Parameters
Type Name Description
System.Type initialImplType

The type of the initial concrete implementation.

System.Func<System.IServiceProvider, System.Collections.Generic.IEnumerable<ITypedResolvable>, System.Object> factoryFunction

A function which creates the instance of the implementation type.

ITypedResolvable[] parameters

An optional collection of ITypedResolvable.

Returns
Type Description
ICustomizesDecorator

A customisation helper by which further implementations may be added to the decorator 'stack'.

Implements

IDecoratorBuilder
ICreatesDecorator
ICustomizesDecorator
IHasDecoratorBasedServiceResolutionInfo
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX