Show / Hide Table of Contents

Class SingleObjectResolutionInfo

Model which represents information about how a service should be resolved.

Inheritance
System.Object
SingleObjectResolutionInfo
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.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 Source

SingleObjectResolutionInfo(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 type is null.

Properties

| Improve this Doc View Source

Dependencies

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>
| Improve this Doc View Source

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:

  1. The wrapped instance (to be decorated)
  2. A service provider, to use in the resolution of the service
  3. A collection of parameters for use in resolving the service

The function must return a non-null service instance.

| Improve this Doc View Source

Type

Gets the type of the service to be resolved.

Declaration
public Type Type { get; }
Property Value
Type Description
System.Type
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX