I can't seem to find an answer to this question. Perhaps I'm phrasing it incorrectly.
I'm trying to inject an exception handler into a class:
void GenericThrowException<T>(T msg)
The handler is supposed to replace the Exception with an ApplicationException. It doesn't do this. It doesn't place any call handlers on the method at all. If I remove the generic method parameter, it works as expected. I'm would assume
this is nothing new to any of you.
I'm guessing that policy injection doesn't work on generic methods, but my question is, is there any way around this? Any "clean" way, at least?
Thanks for any help,
Generic methods are unfortunately not supported by PIAB at this time. I've posted a change that seems to work as a temporary solution at http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=34190;
you can apply the change to the source code or extract the RemotingInterception classes to a new assembly and use them as a custom injector.