Class SingleObjectResolutionInfo
Model which represents information about how a service should be resolved.
Inheritance
Inherited Members
Namespace: CSF.DecoratorBuilder
Assembly: CSF.DecoratorBuilder.Abstractions.dll
Syntax
public class SingleObjectResolutionInfo
Remarks
This model differs from DecoratorBasedServiceResolutionInfo in that this class deals with only a single class within a 'decorator stack' (which may be made from many instances, wrapping one another).
Constructors
| Improve this Doc View SourceSingleObjectResolutionInfo(Type, IEnumerable<ITypedResolvable>, Func<Object, IServiceProvider, IEnumerable<ITypedResolvable>, Object>)
Initialises a new instance of SingleObjectResolutionInfo.
Declaration
public SingleObjectResolutionInfo(Type type, IEnumerable<ITypedResolvable> dependencies = null, Func<object, IServiceProvider, IEnumerable<ITypedResolvable>, object> resolutionFunction = null)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The service type. |
System.Collections.Generic.IEnumerable<ITypedResolvable> | dependencies | An optional collection of dependencies for resolving this object. |
System.Func<System.Object, System.IServiceProvider, System.Collections.Generic.IEnumerable<ITypedResolvable>, System.Object> | resolutionFunction | An optional resolution function. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
Properties
| Improve this Doc View SourceDependencies
Gets a collection of the dependencies for the current service instance.
Declaration
public IList<ITypedResolvable> Dependencies { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<ITypedResolvable> |
ResolutionFunction
Gets an optional custom function which should be used to resolve the service instance.
Declaration
public Func<object, IServiceProvider, IEnumerable<ITypedResolvable>, object> ResolutionFunction { get; }
Property Value
Type | Description |
---|---|
System.Func<System.Object, System.IServiceProvider, System.Collections.Generic.IEnumerable<ITypedResolvable>, System.Object> |
Remarks
The parameters to this function are:
- The wrapped instance (to be decorated)
- A service provider, to use in the resolution of the service
- A collection of parameters for use in resolving the service
The function must return a non-null service instance.
Type
Gets the type of the service to be resolved.
Declaration
public Type Type { get; }
Property Value
Type | Description |
---|---|
System.Type |