Why do you use methodInfo.Invoke instead of Action or Func<TResult>?)

Aug 13, 2009 at 3:24 PM

Michele,

Let me start by thanking you for sharing your excellent tools and quidance.  I've been working with WCF for more than a year now but I am very sure I've been doing things vastly wrong until I came across your screencasts, proxy generator and book. 

Anyway, I was looking at the ExceptionHandlingWCF ProxyBase class and was surprised by your use of "methodInfo.Invoke".  I would have thought that an Action of Func<TResult> would have been a better/faster way to go.  Am I missing something?

BTW, I've bought three separate copies of your book (initially one for me; subsequently two for my team!)....

Coordinator
Aug 14, 2009 at 9:01 PM

Yes, I have already looked at changing it, just haven't had time to make it official. Method.Invoke() is a carry over of past work I'm afraid :)