Share via


IDependencyResolver.GetServices Method

Resolves multiply registered services.

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

Syntax

'Declaration
Function GetServices ( _
    serviceType As Type _
) As IEnumerable(Of Object)
'Usage
Dim instance As IDependencyResolver
Dim serviceType As Type
Dim returnValue As IEnumerable(Of Object)

returnValue = instance.GetServices(serviceType)
IEnumerable<Object> GetServices(
    Type serviceType
)
IEnumerable<Object^>^ GetServices(
    Type^ serviceType
)
function GetServices(
    serviceType : Type
) : IEnumerable<Object>

Parameters

  • serviceType
    Type: System.Type
    The type of the requested services.

Return Value

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

Remarks

Implementers should return an empty collection when no service can be found. The ASP.NET MVC framework will generate a run-time error when implementations throw an exception or return null reference (Nothing in Visual Basic).

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

See Also

Reference

IDependencyResolver Interface

System.Web.Mvc Namespace