Interface ICustomizesAutofacDecorator
A builder/helper object by which a developer selects the decorator types to be used when creating the service.
Namespace: CSF.DecoratorBuilder
Assembly: CSF.DecoratorBuilder.Autofac.dll
Syntax
public interface ICustomizesAutofacDecorator
Methods
| Improve this Doc View SourceThenWrapWith<TDecorator>(Parameter[])
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
ICustomizesAutofacDecorator ThenWrapWith<TDecorator>(params Parameter[] parameters)
where TDecorator : class
Parameters
Type | Name | Description |
---|---|---|
Autofac.Core.Parameter[] | parameters | An optional collection of Autofac.Core.Parameter. |
Returns
Type | Description |
---|---|
ICustomizesAutofacDecorator | 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. |
ThenWrapWith<TDecorator>(Func<Object, IComponentContext, IEnumerable<Parameter>, TDecorator>, Parameter[])
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
ICustomizesAutofacDecorator ThenWrapWith<TDecorator>(Func<object, IComponentContext, IEnumerable<Parameter>, TDecorator> factoryFunction, params Parameter[] parameters)
where TDecorator : class
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Object, Autofac.IComponentContext, System.Collections.Generic.IEnumerable<Autofac.Core.Parameter>, TDecorator> | factoryFunction | A function which creates the instance of the decorator type. |
Autofac.Core.Parameter[] | parameters | An optional collection of Autofac.Core.Parameter. |
Returns
Type | Description |
---|---|
ICustomizesAutofacDecorator | 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. |
ThenWrapWithType(Type, Parameter[])
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
ICustomizesAutofacDecorator ThenWrapWithType(Type decoratorType, params Parameter[] parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Type | decoratorType | The type of the concrete implementation to use as a decorator. |
Autofac.Core.Parameter[] | parameters | An optional collection of Autofac.Core.Parameter. |
Returns
Type | Description |
---|---|
ICustomizesAutofacDecorator | A customisation helper by which further implementations may be added to the decorator 'stack'. |
ThenWrapWithType(Type, Func<Object, IComponentContext, IEnumerable<Parameter>, Object>, Parameter[])
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
ICustomizesAutofacDecorator ThenWrapWithType(Type decoratorType, Func<object, IComponentContext, IEnumerable<Parameter>, object> factoryFunction, params Parameter[] parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Type | decoratorType | The type of the concrete implementation to use as a decorator. |
System.Func<System.Object, Autofac.IComponentContext, System.Collections.Generic.IEnumerable<Autofac.Core.Parameter>, System.Object> | factoryFunction | A function which creates the instance of the decorator type. |
Autofac.Core.Parameter[] | parameters | An optional collection of Autofac.Core.Parameter. |
Returns
Type | Description |
---|---|
ICustomizesAutofacDecorator | A customisation helper by which further implementations may be added to the decorator 'stack'. |