SimpleInjectorMvcExtensionsRegisterMvcControllers Method

Simple Injector
Registers the MVC IController instances (which name end with 'Controller') that are declared as public non-abstract in the supplied set of assemblies.

Namespace:  SimpleInjector
Assembly:  SimpleInjector.Integration.Web.Mvc (in SimpleInjector.Integration.Web.Mvc.dll) Version: 4.10.2
Syntax

public static void RegisterMvcControllers(
	this Container container,
	params Assembly[] assemblies
)

Parameters

container
Type: SimpleInjectorContainer
The container the controllers should be registered in.
assemblies
Type: System.ReflectionAssembly
The assemblies to search.

Usage Note

In 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).
Exceptions

ExceptionCondition
ArgumentNullExceptionThrown when the container is a null reference (Nothing in VB).
See Also

Reference