Show / Hide Table of Contents

Class GenericDecoratorBasedServiceResolutionInfoBuilder<TService>

A generic builder which creates an instance of DecoratorBasedServiceResolutionInfo.

Inheritance
System.Object
GenericDecoratorBasedServiceResolutionInfoBuilder<TService>
Implements
IGenericDecoratorBuilder<TService>
ICreatesDecorator<TService>
ICustomizesDecorator<TService>
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 GenericDecoratorBasedServiceResolutionInfoBuilder<TService> : IGenericDecoratorBuilder<TService>, ICreatesDecorator<TService>, ICustomizesDecorator<TService>, IHasDecoratorBasedServiceResolutionInfo where TService : class
Type Parameters
Name Description
TService

The overall type of the service to be created.

Remarks

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

Constructors

| Improve this Doc View Source

GenericDecoratorBasedServiceResolutionInfoBuilder(ITypedResolvable[])

Initialises a new instance of GenericDecoratorBasedServiceResolutionInfoBuilder<TService>.

Declaration
public GenericDecoratorBasedServiceResolutionInfoBuilder(params ITypedResolvable[] globalParameters)
Parameters
Type Name Description
ITypedResolvable[] globalParameters

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

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<TService> ThenWrapWith<TDecorator>(params ITypedResolvable[] parameters)
    where TDecorator : class, TService
Parameters
Type Name Description
ITypedResolvable[] parameters

An optional collection of ITypedResolvable.

Returns
Type Description
ICustomizesDecorator<TService>

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<TService, 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<TService> ThenWrapWith<TDecorator>(Func<TService, IServiceProvider, IEnumerable<ITypedResolvable>, TDecorator> factoryFunction, params ITypedResolvable[] parameters)
    where TDecorator : class, TService
Parameters
Type Name Description
System.Func<TService, 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<TService>

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<TService> 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<TService>

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

| Improve this Doc View Source

ThenWrapWithType(Type, Func<TService, IServiceProvider, IEnumerable<ITypedResolvable>, TService>, 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<TService> ThenWrapWithType(Type decoratorType, Func<TService, IServiceProvider, IEnumerable<ITypedResolvable>, TService> factoryFunction, params ITypedResolvable[] parameters)
Parameters
Type Name Description
System.Type decoratorType

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

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

A function which creates the instance of the decorator type.

ITypedResolvable[] parameters

An optional collection of ITypedResolvable.

Returns
Type Description
ICustomizesDecorator<TService>

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<TService> UsingInitialImpl<TInitialImpl>(params ITypedResolvable[] parameters)
    where TInitialImpl : class, TService
Parameters
Type Name Description
ITypedResolvable[] parameters

An optional collection of ITypedResolvable.

Returns
Type Description
ICustomizesDecorator<TService>

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<TService> UsingInitialImpl<TInitialImpl>(Func<IServiceProvider, IEnumerable<ITypedResolvable>, TInitialImpl> factoryFunction, params ITypedResolvable[] parameters)
    where TInitialImpl : class, TService
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<TService>

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<TService> 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<TService>

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>, TService>, ITypedResolvable[])

Selects the initial implementation type.

Declaration
public ICustomizesDecorator<TService> UsingInitialImplType(Type initialImplType, Func<IServiceProvider, IEnumerable<ITypedResolvable>, TService> 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>, TService> factoryFunction

A function which creates the instance of the implementation type.

ITypedResolvable[] parameters

An optional collection of ITypedResolvable.

Returns
Type Description
ICustomizesDecorator<TService>

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

Implements

IGenericDecoratorBuilder<TService>
ICreatesDecorator<TService>
ICustomizesDecorator<TService>
IHasDecoratorBasedServiceResolutionInfo
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX