Jun 28, 2009 at 7:53 AM
Edited Jun 28, 2009 at 7:55 AM

This add-in is great. I have been hand coding my client proxies in a similar manner, but could not do it for my service references. But now I can!

I was reviewing the source code for ExceptionHandlingProxyBase<T> and I have a few minor suggestions for my fellow Canadian.

  1. I notice you are calling CreateProxy() virtual method in the contructors. This could cause bugs for people that override this method in derived classes, see
  2. It would be good to remove all your debugging Trace.WriteLine(); method calls. The informational calls, if required, should be replaced with System.Diagnostics.TraceSource.  It is not too pleasant on large project when the trace system is being abused.
  3. You can use the IEnumerable<T>.Any() extension method as opposed to  IEnumerable<T>.Count() to see if there are any members, on big collections, this could help.

Like I said, these are minor suggestions. Happy Canada Day & Independence Day!

Jun 29, 2009 at 8:18 AM

Hi there,

#1 I'll address in my next update

#2 happy to remove, but you know these lines are only used in debug mode right? I left them in so people could see what happens if they are wondering if thigns are working for them.

#3 will take a look! Thanks!

Jun 29, 2009 at 2:40 PM
Edited Jun 29, 2009 at 2:43 PM

Yes, I am aware System.Diagnostics.Trace uses conditional attribute so that the calls are ignored unless TRACE is defined. By default TRACE is only defined in a debug build.

My project is very large with 15+ different service contracts. During debugging, the trace output just can get very busy.  However, with Visual Studio a quick search and I can comment them all out quickly.

Jun 29, 2009 at 3:12 PM

Gotcha, yeah, I can remove trace, I thought it was more useful than it is I guess!