SimpleInjectorWebApiExtensionsRegisterWebApiControllers Method (Container, HttpConfiguration, Assembly)

Simple Injector
Registers the Web API IHttpController types that available for the application. This method uses the configured IHttpControllerTypeResolver to determine which controller types to register.

Namespace:  SimpleInjector
Assembly:  SimpleInjector.Integration.WebApi (in SimpleInjector.Integration.WebApi.dll) Version: 4.0.0
Syntax

public static void RegisterWebApiControllers(
	this Container container,
	HttpConfiguration configuration,
	params Assembly[] assemblies
)

Parameters

container
Type: SimpleInjectorContainer
The container the controllers should be registered in.
configuration
Type: HttpConfiguration
The HttpConfiguration to use to get the Controller types to register.
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 one of the arguments is a null reference (Nothing in VB).
See Also

Reference