RegistrationExtensionsAsModelBinderForTypesTLimit, TActivatorData, TRegistrationStyle Method |
Sets a provided registration to act as an IModelBinder for the specified list of types.
Namespace:
Autofac.Integration.WebApi
Assembly:
Autofac.Integration.WebApi (in Autofac.Integration.WebApi.dll) Version: 6.0.0+03bf347ff3a78c2557675254b1a417eef4b464ec
Syntax public static IRegistrationBuilder<TLimit, TActivatorData, TRegistrationStyle> AsModelBinderForTypes<TLimit, TActivatorData, TRegistrationStyle>(
this IRegistrationBuilder<TLimit, TActivatorData, TRegistrationStyle> registration,
params Type[] types
)
where TActivatorData : IConcreteActivatorData
where TRegistrationStyle : SingleRegistrationStyle
<ExtensionAttribute>
Public Shared Function AsModelBinderForTypes(Of TLimit, TActivatorData As IConcreteActivatorData, TRegistrationStyle As SingleRegistrationStyle) (
registration As IRegistrationBuilder(Of TLimit, TActivatorData, TRegistrationStyle),
ParamArray types As Type()
) As IRegistrationBuilder(Of TLimit, TActivatorData, TRegistrationStyle)
Parameters
- registration
- Type: Autofac.BuilderIRegistrationBuilderTLimit, TActivatorData, TRegistrationStyle
The registration for the type or object instance that will act as the model binder. - types
- Type: SystemType
The list of model Type for which the registration should be a model binder.
Type Parameters
- TLimit
- Registration limit type.
- TActivatorData
- Activator data type.
- TRegistrationStyle
- Registration style.
Return Value
Type:
IRegistrationBuilderTLimit,
TActivatorData,
TRegistrationStyleAn Autofac registration that can be modified as needed.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IRegistrationBuilderTLimit,
TActivatorData,
TRegistrationStyle. 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 See Also