I have a few c# class libraries which I share between applications. I want to create a Windows 8 Style App, but it only supports windows 8 class libraries or portable class libraries. Deciding to go with the later I've ported everything without too much difficulty with the exception of Async operations.
Currently my class libraries are implementing the Event-based Asynchronous pattern.
From this example a portable library doesn't seem to support System.Componenent.AsyncOperation/AsyncOperationManager and System.Collections.Specialized.HybridDictionary.
My two questions are:
1) What is a good collection to use instead of HybridDictionary?
2) How can I get around the lack of AsyncOperation/AsyncOperationManager? Do I need to implement a completely different pattern?
UPDATE: In VS 2012 my Portable class library is targeting ".net framework 4 and higher", "Silverlight 4 and higher", "windows phone 7 and higher", ".net for metro style apps".
1) How many elements are you using in HybridDictionary? If under 10), just use List<T>. Otherwise, use Dictionary<Key, TValue>.
2) I've got a portable version of AsyncOperation/AsyncOperationManager and BackgroundWorker over on http://pclcontrib.codeplex.com/. There's no binaries yet, but just browse the Portable.ComponentModel.Async project for the source code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With