DependencyResolver.SetResolver Method

 

Provides a registration point for dependency resolvers.

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

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticSetResolver(Func<Type, Object>, Func<Type, IEnumerable<Object>>)

Provides a registration point for dependency resolvers using the specified service delegate and specified service collection delegates.

System_CAPS_pubmethodSystem_CAPS_staticSetResolver(IDependencyResolver)

Provides a registration point for dependency resolvers, using the specified dependency resolver interface.

System_CAPS_pubmethodSystem_CAPS_staticSetResolver(Object)

Provides a registration point for dependency resolvers using the provided common service locator when using a service locator interface.

Return to top

DependencyResolver.SetResolver Method (Func<Type, Object>, Func<Type, IEnumerable<Object>>)

Provides a registration point for dependency resolvers using the specified service delegate and specified service collection delegates.

No code example is currently available or this language may not be supported.

Parameters

getService
Type: System.Func<TypeObject>

The service delegate.

getServices
Type: System.Func<TypeIEnumerable<Object>>

The services delegates.

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

Return to top

DependencyResolver.SetResolver Method (IDependencyResolver)

Provides a registration point for dependency resolvers, using the specified dependency resolver interface.

No code example is currently available or this language may not be supported.

Parameters

resolver
Type: System.Web.Mvc.IDependencyResolver

The dependency resolver.

Use this method when you have an implementation of IDependencyResolver. For more information about DependencyResolver, see the entry ASP.NET MVC 3 Service Location on Brad Wilson's blog.

Return to top

DependencyResolver.SetResolver Method (Object)

Provides a registration point for dependency resolvers using the provided common service locator when using a service locator interface.

No code example is currently available or this language may not be supported.

Parameters

commonServiceLocator
Type: System.Object

The common service locator.

The commonServiceLocator parameter can be an instance of IDependencyResolver or an object that implements the Common Service Locator IServiceLocator interface. For more information about Common Service Locator, see Common Service Locator Library on the CodePlex Web site. For more information about DependencyResolver, see the entry ASP.NET MVC 3 Service Location on Brad Wilson's blog.

Return to top
Show: