Wednesday, June 13, 2007

I was helping a friend with a problem recently.  He was taking a set of serial web service calls and doing them in parallel to save time, and was not up-to-speed on the best approach for that.  Once he settled on an approach, he realized that since his web service calls were being wrapped in an abstraction layer, he didn't have the Begin/End asynchronous call methods that are provided by the proxy class.

"No problem, just wrap them in a delegate".  The compiler automatically gives you Begin/EndInvoke methods in addition to the synchronous Invoke method.  And, you're guaranteed not to mess up the implementation because it's all provided by the CLR!  Just one of those things you might forget if you find yourself in the same situation.

Wednesday, June 13, 2007 5:17:57 PM (Pacific Standard Time, UTC-08:00)
Mark's always going on about delegates, and I've understood them theoretically, but I never had a real-world use for them until today. Now I understand them better practically.
Wednesday, June 13, 2007 9:35:48 PM (Pacific Standard Time, UTC-08:00)
Well, you never had a use aside from the core scenarios like events, etc.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):