Hi,
Why is this not possible to inherit multiple advice interface on a single advice? (Sorry it's possible but the behavior is not as expected)
For example if I want to get this:
It will fire only the first interface found, in this case IMethodBeforeAdvice.Code:public class MethodAdvice : IMethodBeforeAdvice, IAfterReturningAdvice , IThrowsAdvice { private static readonly ILog Logger = LogManager.GetLogger(Assembly.GetExecutingAssembly().GetType()); public void Before(System.Reflection.MethodInfo method, object[] args, object target) { Logger.Info("Before call"); } public void AfterReturning(object returnValue, System.Reflection.MethodInfo method, object[] args, object target) { Logger.Info("After call"); } public void AfterThrowing(ApplicationException aex) { Logger.Info("Exception"); } }
For to solve this i used IMethodInterceptor instead of the Advice interfaces
But Is there a way to use only the advice interfaces?


Reply With Quote
