IDependencyResolver Interface
Defines the methods that simplify service location and dependency resolution.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Syntax
'Declaration
Public Interface IDependencyResolver
'Usage
Dim instance As IDependencyResolver
public interface IDependencyResolver
public interface class IDependencyResolver
public interface IDependencyResolver
The IDependencyResolver type exposes the following members.
Methods
Name | Description | |
---|---|---|
GetService | Resolves singly registered services that support arbitrary object creation. | |
GetServices | Resolves multiply registered services. |
Top
Extension Methods
Name | Description | |
---|---|---|
GetService<TService> | Resolves singly registered services that support arbitrary object creation. (Defined by DependencyResolverExtensions.) | |
GetServices<TService> | Resolves multiply registered services. (Defined by DependencyResolverExtensions.) |
Top
Remarks
Implementations of this interface should delegate to the underlying dependency injection container to provide the registered service for the requested type. When there are no registered services of the requested type, the ASP.NET MVC framework expects implementations of this interface to return null reference (Nothing in Visual Basic) from GetService and to return an empty collection from GetServices.
For more information about IDependencyResolver, see the entry ASP.NET MVC 3 Service Location on Brad Wilson's blog.