Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

AopUtils.CanApply(IAdvisor, Type, Type) Method

Can the supplied advisor apply at all on the supplied targetType?

[Visual Basic]
Public Overloads Shared Sub CanApply( _
   ByVal advisor As IAdvisor, _
   ByVal targetType As Type, _
   ByVal proxyInterfaces As Type _
)
[C#]
public static bool CanApply(
   IAdvisor advisor,
   Type targetType,
   Type[] proxyInterfaces
);

Parameters

advisor
The advisor to check.
targetType
The class being tested.
proxyInterfaces
The interfaces being proxied. If a null reference (Nothing in Visual Basic), all methods on a class may be proxied.

Return Value

true if the advisor can apply on any method.

Remarks

This is an important test as it can be used to optimize out an advisor for a class.

See Also

AopUtils Class | Spring.Aop.Framework Namespace | AopUtils.CanApply Overload List