Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DependencyResolverExtensions Class

 

Provides a type-safe implementation of GetService and GetServices.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

System.Object
  System.Web.Mvc.DependencyResolverExtensions

public static class DependencyResolverExtensions

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticGetService<TService>(IDependencyResolver)

Resolves singly registered services that support arbitrary object creation.

System_CAPS_pubmethodSystem_CAPS_staticGetServices<TService>(IDependencyResolver)

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 that avoids casting.

For more information about DependencyResolverExtensions, see the entry ASP.NET MVC 3 Service Location on Brad Wilson's blog.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2017 Microsoft