spmva
06-03-2005, 08:03 PM
I've been working with the AOP implementation for the past couple of days and have found it to be quite an excellent accomplishment. The design was very intuitive and I was pleased to find that it didn't take long for me to get things running.
Anyway, more in line with the subject of this post, what is the preferred method to disallow processing of a method when implementing an IMethodInterceptor?
In other words, I implement the Invoke method. In that method I decide whether or not to call the Proceed method on the IMethodInvocation and return it's value. Assuming that my course of action within the Invoke method determines that Proceed should NOT be called, what is the best way to notify the client that processing did not take place.
Throwing an exception of some sort sounds logical, but some of my preliminary tests taking that course didn't react as i had suspected they would.
thanks,
steve
Anyway, more in line with the subject of this post, what is the preferred method to disallow processing of a method when implementing an IMethodInterceptor?
In other words, I implement the Invoke method. In that method I decide whether or not to call the Proceed method on the IMethodInvocation and return it's value. Assuming that my course of action within the Invoke method determines that Proceed should NOT be called, what is the best way to notify the client that processing did not take place.
Throwing an exception of some sort sounds logical, but some of my preliminary tests taking that course didn't react as i had suspected they would.
thanks,
steve