DependencyResolverExtensions Class
Provides a type-safe implementation of GetService and GetServices.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
The DependencyResolverExtensions type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | GetService(TService) | Resolves singly registered services that support arbitrary object creation. |
![]() ![]() | GetServices(TService) | Resolves multiply registered services. |
The methods defined in this type provide a simplified, type-safe implementation of IDependencyResolver. These extension methods provide an early-bound and strongly-typed generic implementation of GetService and GetServices(Type) that avoids casting.
For more information about DependencyResolverExtensions, see the entry ASP.NET MVC 3 Service Location on Brad Wilson's blog.
Show:
.gif?cs-save-lang=1&cs-lang=jscript)
.gif?cs-save-lang=1&cs-lang=jscript)