Advice executed before a method is invoked.
For a list of all members of this type, see IMethodBeforeAdvice Members .
| 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)
IMethodBeforeAdvice Members | Spring.Aop Namespace | IBeforeAdvice | IAfterReturningAdvice | IThrowsAdvice | IMethodInterceptor