Click or drag to resize

RegistrationExtensionsRegisterControllers Method

Register types that implement IController in the provided assemblies.

Namespace:  Autofac.Integration.Mvc
Assembly:  Autofac.Integration.Mvc (in Autofac.Integration.Mvc.dll) Version: 6.0.0+106fe194fc419c09f32d39119967f68798cc6895
public static IRegistrationBuilder<Object, ScanningActivatorData, DynamicRegistrationStyle> RegisterControllers(
	this ContainerBuilder builder,
	params Assembly[] controllerAssemblies


Type: AutofacContainerBuilder
The container builder.
Type: System.ReflectionAssembly
Assemblies to scan for controllers.

Return Value

Type: IRegistrationBuilderObject, ScanningActivatorData, DynamicRegistrationStyle
Registration builder allowing the controller components to be customised.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ContainerBuilder. 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).
See Also