针对Windows Store,iOS和Droid的可移植类库中的Async/Await [英] Async/Await in portable class library targeting Windows Store, iOS and Droid
问题描述
开发针对Android和iOS(Xamarin/Mono)和Windows应用商店的MvvmCross应用程序(因为与iOS/Android相比,调试起来如此简单/快捷).
Developping an MvvmCross application targeting Android and iOS (Xamarin/Mono) and Windows Store (because it's so easy/fast to debug compared to iOS/Android).
应用程序的核心是基于PCL.
The Core of the app is PCL based.
是否可以在Core库中使用Async/Await?
Is it possible to use Async/Await in the Core library?
Xamarin mono支持Async/Await,而Windows Store支持. 但是,当仅选择Net4.5,Windows Store,Mono Android和MonoTouch作为PCL目标时,将自动选择SL4和WP7.5,并且不再提供Async/Await.
Xamarin mono supports Async/Await, and Windows Store supports it. However, when selecting only Net4.5, Windows Store, Mono Android and MonoTouch as the PCL targets, SL4 and WP7.5 get automatically selected and Async/Await is not availlable anymore.
推荐答案
我最新的信息是:但是Xamarin的PCL支持已在上周正式启动-所以我最新的消息已经过时了. Miguel答应从Build返回时,会写一篇关于当前状态的博客文章.
But PCL support from Xamarin has officially launched in the last week - so the latest I have is be out of date. Miguel has promised a blog post on the current status when he returns from Build.
此外,我还从 http://forums.xamarin.com/discussion/comment/18872/#Comment_18872 -会喜欢才能看到更完整的博客文章,并进行解释,并由那些起作用的人进行记录.
Also, I have seen user comments like "I'm using asyncbridge and profile47 with heavily usage of async inside PCL. Works perfect on iOs and Android, with MvvmCross events it looks like a magic" from http://forums.xamarin.com/discussion/comment/18872/#Comment_18872 - would love to see this more fully blogged, explained, documented by those who have it working.
这篇关于针对Windows Store,iOS和Droid的可移植类库中的Async/Await的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!