Interface IDependencyResolver

Specifies the contract how to resolve a dependency (System.Reflection.ParameterInfo or System.Reflection.PropertyInfo).

Namespace: Solti.Utils.DI.Interfaces
Assembly: Solti.Utils.DI.Interfaces.dll
Syntax
public interface IDependencyResolver

Properties

Id

Name of this resolver.

Declaration
object Id { get; }
Property Value
Type Description
System.Object

Methods

Resolve(ParameterExpression, DependencyDescriptor, Object, Object, CallNextDelegate<Object, Expression>)

Tries to resolve a dependency.

Declaration
Expression Resolve(ParameterExpression injector, DependencyDescriptor dependency, object userData, object context, CallNextDelegate<object, Expression> next)
Parameters
Type Name Description
System.Linq.Expressions.ParameterExpression injector

The IInjector instance to be used to resolve the dependency.

DependencyDescriptor dependency

The dependency descriptor.

System.Object userData

Optional data, passed by the end-user.

System.Object context

Optional data, passed by the previous resolver.

CallNextDelegate<System.Object, System.Linq.Expressions.Expression> next

Invokes the next resolver.

Returns
Type Description
System.Linq.Expressions.Expression

The resolution of the requiested dependency, for instance

(TDependency) injector.Get(dependency.Type, options.Name)

In This Article
Back to top Generated by DocFX