IDependencyResolver.GetService Method
Resolves singly registered services that support arbitrary object creation.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Syntax
'Declaration
Function GetService ( _
serviceType As Type _
) As Object
'Usage
Dim instance As IDependencyResolver
Dim serviceType As Type
Dim returnValue As Object
returnValue = instance.GetService(serviceType)
Object GetService(
Type serviceType
)
Object^ GetService(
Type^ serviceType
)
function GetService(
serviceType : Type
) : Object
Parameters
- serviceType
Type: System.Type
The type of the requested service or object.
Return Value
Type: System.Object
The requested service or object.
Remarks
Implementers should return null reference (Nothing in Visual Basic) when the service cannot be found. Use GetServices(Type) to return multiple services.
For more information about this method, see the entry ASP.NET MVC 3 Service Location on Brad Wilson's blog.