Interface IGetsAutofacDecoratedService
A factory service which uses the decorator pattern to build and return a service by specifying which implementation types to use and in which order.
Namespace: CSF.DecoratorBuilder
Assembly: CSF.DecoratorBuilder.Autofac.dll
Syntax
public interface IGetsAutofacDecoratedService
Methods
| Improve this Doc View SourceGetDecoratedService(Type, Func<ICreatesAutofacDecorator, ICustomizesAutofacDecorator>, Parameter[])
Builds and returns an instance of a service, using the decorator pattern.
Declaration
object GetDecoratedService(Type serviceType, Func<ICreatesAutofacDecorator, ICustomizesAutofacDecorator> customizationFunc, params Parameter[] globalParams)
Parameters
Type | Name | Description |
---|---|---|
System.Type | serviceType | The service type, typically an interface. |
System.Func<ICreatesAutofacDecorator, ICustomizesAutofacDecorator> | customizationFunc | A customization function, to build the 'shape' of the decorated service. |
Autofac.Core.Parameter[] | globalParams | An optional collection of resolution parameters, to be applied to every resolution operation. |
Returns
Type | Description |
---|---|
System.Object | The service instance. |
GetDecoratedService<TService>(Func<ICreatesAutofacDecorator<TService>, ICustomizesAutofacDecorator<TService>>, Parameter[])
Builds and returns an instance of a service, using the decorator pattern.
Declaration
TService GetDecoratedService<TService>(Func<ICreatesAutofacDecorator<TService>, ICustomizesAutofacDecorator<TService>> customizationFunc, params Parameter[] globalParams)
where TService : class
Parameters
Type | Name | Description |
---|---|---|
System.Func<ICreatesAutofacDecorator<TService>, ICustomizesAutofacDecorator<TService>> | customizationFunc | A customization function, to build the 'shape' of the decorated service. |
Autofac.Core.Parameter[] | globalParams | An optional collection of resolution parameters, to be applied to every resolution operation. |
Returns
Type | Description |
---|---|
TService | The service instance. |
Type Parameters
Name | Description |
---|---|
TService | The service type, typically an interface. |