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.
Assembly: SimpleInjector.Integration.Web.Mvc (in SimpleInjector.Integration.Web.Mvc.dll) Version: 4.9.0
public static void RegisterMvcIntegratedFilterProvider( this Container container )
<ExtensionAttribute> Public Shared Sub RegisterMvcIntegratedFilterProvider ( container As Container )
- Type: SimpleInjectorContainer
The container that should be used for injecting properties into attributes that the MVC framework uses.
Usage NoteIn Visual Basic and C#, you can call this method as an instance method on any object of type Container. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
|ArgumentNullException||Thrown when the container is a null reference.|
|InvalidOperationException||Thrown when a MVC filter provider has already been registered for a different container.|