Reputation: 368
as we know . Windows phone programming model is asynchronous. The Begin end programming model take a lot of problems. Is there have a way to perform asynchronous operations like synchronization?
well just taken few minutes i found Visual Studio Async CTP:http://msdn.microsoft.com/zh-cn/vstudio/async. but the homepage didn't have enough document describe how to use it?
so except Visual Studio ASync is there have any three part Framework work for this problem? Any suggestions on windows phone asynchronous package?
Thanks
Upvotes: 0
Views: 76
Reputation: 70142
Whilst it is hard to determine exactly what you are after, it sounds like you are looking for a better API for handling asynchronous requests? How about looking at the reactive extensions framework, which is available for windows phone.
You can find a tutorial I wrote on using Rx on codeproject. It allows you to pipeline events into much more readable application flow, from the article linked ...
Observable.FromEvent<TextChangedEventArgs>(searchTextBox, "TextChanged")
.Select(e => ((TextBox)e.Sender).Text)
.Where(text => text.Length > 2)
.Throttle(TimeSpan.FromMilliseconds(400))
.SelectMany(txt => searchTwitter(txt))
.Select(searchRes => ParseTwitterSearch(searchRes))
.ObserveOnDispatcher()
.Subscribe(tweets => searchResults.ItemsSource = tweets);
Upvotes: 1