Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

IMethodBeforeAdvice Interface

Advice executed before a method is invoked.

For a list of all members of this type, see IMethodBeforeAdvice Members .

[Visual Basic]
Public Interface IMethodBeforeAdvice
    Implements IBeforeAdvice, IAdvice
public interface IMethodBeforeAdvice : IBeforeAdvice, IAdvice

Types that implement IMethodBeforeAdvice

Type Description
ParameterValidationAdvice This advice is typically applied to service-layer methods in order to validate method arguments.


Such advice cannot prevent the method call proceeding, short of throwing an Exception.

The main advantage of before advice is that there is no possibility of inadvertently failing to proceed down the interceptor chain, since there is no need (and indeed means) to invoke the next interceptor in the call chain.

Possible uses for this type of advice would include performing class invariant checks prior to the actual method invocation, the ubiquitous logging of method invocations (useful during development), etc.


Namespace: Spring.Aop

Assembly: Spring.Aop (in Spring.Aop.dll)

See Also

IMethodBeforeAdvice Members | Spring.Aop Namespace | IBeforeAdvice | IAfterReturningAdvice | IThrowsAdvice | IMethodInterceptor