Click or drag to resize

RegistrationExtensionsAsResultFilterForTController Method (IRegistrationBuilderObject, IConcreteActivatorData, SingleRegistrationStyle, ExpressionActionTController, Int32)

Sets the provided registration to act as an IResultFilter for the specified controller action.

Namespace:  Autofac.Integration.Mvc
Assembly:  Autofac.Integration.Mvc (in Autofac.Integration.Mvc.dll) Version: 6.0.0+106fe194fc419c09f32d39119967f68798cc6895
Syntax
public static IRegistrationBuilder<Object, IConcreteActivatorData, SingleRegistrationStyle> AsResultFilterFor<TController>(
	this IRegistrationBuilder<Object, IConcreteActivatorData, SingleRegistrationStyle> registration,
	Expression<Action<TController>> actionSelector,
	int order = -1
)
where TController : IController

Parameters

registration
Type: Autofac.BuilderIRegistrationBuilderObject, IConcreteActivatorData, SingleRegistrationStyle
The registration.
actionSelector
Type: System.Linq.ExpressionsExpressionActionTController
The action selector.
order (Optional)
Type: SystemInt32
The order in which the filter is applied.

Type Parameters

TController
The type of the controller.

Return Value

Type: IRegistrationBuilderObject, IConcreteActivatorData, SingleRegistrationStyle
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 IRegistrationBuilderObject, IConcreteActivatorData, SingleRegistrationStyle. 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