Async/Await in portable class library targeting Windows Store, iOS and Droid

浪尽此生 提交于 2020-01-22 15:35:07

问题


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).

The Core of the app is PCL based.

Is it possible to use Async/Await in the Core library?

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.


回答1:


The latest I have is: TPL on PCL of mvvmcross

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.

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.



来源:https://stackoverflow.com/questions/17302766/async-await-in-portable-class-library-targeting-windows-store-ios-and-droid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!