RegistrationExtensionsInstancePerApiControllerTypeTLimit, TActivatorData, TStyle Method (IRegistrationBuilderTLimit, TActivatorData, TStyle, Type, Boolean) |
Share one instance of the component within the context of a controller type.
Namespace:
Autofac.Integration.WebApi
Assembly:
Autofac.Integration.WebApi (in Autofac.Integration.WebApi.dll) Version: 6.0.0+03bf347ff3a78c2557675254b1a417eef4b464ec
Syntax public static IRegistrationBuilder<TLimit, TActivatorData, TStyle> InstancePerApiControllerType<TLimit, TActivatorData, TStyle>(
this IRegistrationBuilder<TLimit, TActivatorData, TStyle> registration,
Type controllerType,
bool clearExistingServices
)
<ExtensionAttribute>
Public Shared Function InstancePerApiControllerType(Of TLimit, TActivatorData, TStyle) (
registration As IRegistrationBuilder(Of TLimit, TActivatorData, TStyle),
controllerType As Type,
clearExistingServices As Boolean
) As IRegistrationBuilder(Of TLimit, TActivatorData, TStyle)
Parameters
- registration
- Type: Autofac.BuilderIRegistrationBuilderTLimit, TActivatorData, TStyle
The registration to configure. - controllerType
- Type: SystemType
The controller type. - clearExistingServices
- Type: SystemBoolean
Clear the existing list of controller level services before adding.
Type Parameters
- TLimit
- Registration limit type.
- TActivatorData
- Activator data type.
- TStyle
- Registration style.
Return Value
Type:
IRegistrationBuilderTLimit,
TActivatorData,
TStyleA 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
IRegistrationBuilderTLimit,
TActivatorData,
TStyle. 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