Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetService Method
Collapse the table of content
Expand the table of content

IDependencyResolver.GetService Method (Type)

 

Resolves singly registered services that support arbitrary object creation.

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

object GetService(
	Type serviceType
)

Parameters

serviceType
Type: System.Type

The type of the requested service or object.

Return Value

Type: System.Object

The requested service or object.

Implementers should return null when the service cannot be found. Use GetServices to return multiple services.

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

Return to top
Show:
© 2015 Microsoft