Wednesday, October 12, 2011

Rocky works up a BackgroundWorker for WinRT

Rockford Lhotka - WinRT BackgroundWorker type

There is no BackgroundWorker (BW) component in WinRT. Although that is arguably a good thing, I have CSLA .NET code that relies on this component. I can’t eliminate the BW from CSLA, because I need to continue to support .NET, Silverlight, and Windows Phone, even as I add support for WinRT.

Because .NET/SL/WP7 don’t (yet) have the async/await keywords, and WinRT doesn’t have BW, I need to come up with a solution that leaves existing code/behavior alone, and yet provides comparable behavior in WinRT.

To resolve this issue, I’ve created a BackgroundWorker type for WinRT. This type hasn’t gone through extensive testing, but it is a good start at least:



I was just listening to Rocky talk about this (and WinRT) this morning on .Net Rocks, Rocky and Billy Introduce WinRT!, and wanted to find out if he made the source available... Guess so. :)

This is SO much one of those "I'm going to need this in six months" kind of thing. So if I post it here in my full text searchable remote, cloud based, memory store I might even be able to find it then. :P

No comments: