Click or drag to resize

RegistrationExtensionsEnableClassInterceptorsTLimit, TConcreteReflectionActivatorData, TRegistrationStyle Method (IRegistrationBuilderTLimit, TConcreteReflectionActivatorData, TRegistrationStyle)

Enable class interception on the target type. Interceptors will be determined via Intercept attributes on the class or added with InterceptedBy(). Only virtual methods can be intercepted this way.

Namespace:  Autofac.Extras.DynamicProxy
Assembly:  Autofac.Extras.DynamicProxy (in Autofac.Extras.DynamicProxy.dll) Version: 6.0.0+d14b34a0bec59c4984cd6167bf2f3e37fb6e1002
Syntax
public static IRegistrationBuilder<TLimit, TConcreteReflectionActivatorData, TRegistrationStyle> EnableClassInterceptors<TLimit, TConcreteReflectionActivatorData, TRegistrationStyle>(
	this IRegistrationBuilder<TLimit, TConcreteReflectionActivatorData, TRegistrationStyle> registration
)
where TConcreteReflectionActivatorData : ConcreteReflectionActivatorData

Parameters

registration
Type: Autofac.BuilderIRegistrationBuilderTLimit, TConcreteReflectionActivatorData, TRegistrationStyle
Registration to apply interception to.

Type Parameters

TLimit
Registration limit type.
TConcreteReflectionActivatorData
Activator data type.
TRegistrationStyle
Registration style.

Return Value

Type: IRegistrationBuilderTLimit, TConcreteReflectionActivatorData, TRegistrationStyle
Registration builder allowing the registration to be configured.

Usage Note

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