DependencyResolverExtensions.GetServices<TService> Method

Resolves multiply registered services.

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

public static IEnumerable<TService> GetServices<TService>(
	this IDependencyResolver resolver

Type Parameters


The type of the requested services.


Type: System.Web.Mvc.IDependencyResolver

The dependency resolver instance that this method extends.

Return Value

Type: System.Collections.Generic.IEnumerable<TService>
The requested services.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDependencyResolver. When you use instance method syntax to call this method, omit the first parameter. For more information, see or

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