Extension methods for integrating Simple Injector with ASP.NET MVC applications.
Inheritance Hierarchy
SimpleInjectorSimpleInjectorMvcExtensions
Namespace: SimpleInjector
Assembly: SimpleInjector.Integration.Web.Mvc (in SimpleInjector.Integration.Web.Mvc.dll) Version: 4.10.2
Syntax
The SimpleInjectorMvcExtensions type exposes the following members.
Methods
Name | Description | |
---|---|---|
GetControllerTypesToRegister |
Returns all public, non abstract, non generic types that implement IController and
which name end with "Controller" that are located in the supplied assemblies.
| |
RegisterMvcControllers |
Registers the MVC IController instances (which name end with 'Controller') that are
declared as public non-abstract in the supplied set of assemblies.
| |
RegisterMvcIntegratedFilterProvider | Registers a IFilterProvider that allows filter attributes to go through the
Simple Injector pipeline (https://simpleinjector.org/pipel). This allows any registered property to be
injected if a custom IPropertySelectionBehavior in configured in the container, and
allows anyinitializers to be called on those
attributes.
Please note that attributes are cached by MVC, so only dependencies should be injected that
have the singleton lifestyle. |
See Also