Export (0) Print
Expand All

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

TService

The type of the requested services.

Parameters

resolver
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 http://msdn.microsoft.com/en-us/library/bb384936(v=vs.108) or http://msdn.microsoft.com/en-us/library/bb383977(v=vs.108).

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

Show:
© 2014 Microsoft