Interface ICreatesAutofacDecorator<TService>
A builder/helper object by which a developer selects the initial concrete implementation type for the innermost object in the decorator 'stack'. This is the one class in the stack which is itself not a decorator type.
Namespace: CSF.DecoratorBuilder
Assembly: CSF.DecoratorBuilder.Autofac.dll
Syntax
public interface ICreatesAutofacDecorator<TService>
where TService : class
Type Parameters
Name | Description |
---|---|
TService | The service type, typically an interface. |
Methods
| Improve this Doc View SourceUsingInitialImpl<TInitialImpl>(Parameter[])
Selects the initial implementation type using a generic type parameter.
Declaration
ICustomizesAutofacDecorator<TService> UsingInitialImpl<TInitialImpl>(params Parameter[] parameters)
where TInitialImpl : class, TService
Parameters
Type | Name | Description |
---|---|---|
Autofac.Core.Parameter[] | parameters | An optional collection of Autofac.Core.Parameter. |
Returns
Type | Description |
---|---|
ICustomizesAutofacDecorator<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. |
UsingInitialImpl<TInitialImpl>(Func<IComponentContext, IEnumerable<Parameter>, TInitialImpl>, Parameter[])
Selects the initial implementation type using a generic type parameter.
Declaration
ICustomizesAutofacDecorator<TService> UsingInitialImpl<TInitialImpl>(Func<IComponentContext, IEnumerable<Parameter>, TInitialImpl> factoryFunction, params Parameter[] parameters)
where TInitialImpl : class, TService
Parameters
Type | Name | Description |
---|---|---|
System.Func<Autofac.IComponentContext, System.Collections.Generic.IEnumerable<Autofac.Core.Parameter>, TInitialImpl> | factoryFunction | A function which creates the instance of the implementation type. |
Autofac.Core.Parameter[] | parameters | An optional collection of Autofac.Core.Parameter. |
Returns
Type | Description |
---|---|
ICustomizesAutofacDecorator<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. |
UsingInitialImplType(Type, Parameter[])
Selects the initial implementation type.
Declaration
ICustomizesAutofacDecorator<TService> UsingInitialImplType(Type initialImplType, params Parameter[] parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Type | initialImplType | The type of the initial concrete implementation. |
Autofac.Core.Parameter[] | parameters | An optional collection of Autofac.Core.Parameter. |
Returns
Type | Description |
---|---|
ICustomizesAutofacDecorator<TService> | A customisation helper by which further implementations may be added to the decorator 'stack'. |
UsingInitialImplType(Type, Func<IComponentContext, IEnumerable<Parameter>, TService>, Parameter[])
Selects the initial implementation type.
Declaration
ICustomizesAutofacDecorator<TService> UsingInitialImplType(Type initialImplType, Func<IComponentContext, IEnumerable<Parameter>, TService> factoryFunction, params Parameter[] parameters)
Parameters
Type | Name | Description |
---|---|---|
System.Type | initialImplType | The type of the initial concrete implementation. |
System.Func<Autofac.IComponentContext, System.Collections.Generic.IEnumerable<Autofac.Core.Parameter>, TService> | factoryFunction | A function which creates the instance of the implementation type. |
Autofac.Core.Parameter[] | parameters | An optional collection of Autofac.Core.Parameter. |
Returns
Type | Description |
---|---|
ICustomizesAutofacDecorator<TService> | A customisation helper by which further implementations may be added to the decorator 'stack'. |