Click or drag to resize

RegistrationExtensionsRegisterWebApiModelBinders Method

Note: This API is now obsolete.

Register types that implement IModelBinder in the provided assemblies.

Namespace:  Autofac.Integration.WebApi
Assembly:  Autofac.Integration.WebApi (in Autofac.Integration.WebApi.dll) Version: 6.0.0+03bf347ff3a78c2557675254b1a417eef4b464ec
[ObsoleteAttribute("Use the AsModelBinderForTypes() registration extension to register model binders and be sure to RegisterWebApiModelBinderProvider() in your container if you do. This method doesn't connect the model binders to the Autofac binder provider. It will be removed in a future version.")]
public static IRegistrationBuilder<Object, ScanningActivatorData, DynamicRegistrationStyle> RegisterWebApiModelBinders(
	this ContainerBuilder builder,
	params Assembly[] modelBinderAssemblies


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

Return Value

Type: IRegistrationBuilderObject, ScanningActivatorData, DynamicRegistrationStyle
A registration builder allowing further configuration of the component.

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).
ArgumentNullException Thrown if builder or modelBinderAssemblies is .
See Also