【发布时间】:2012-04-04 12:45:15
【问题描述】:
我对 Reactive Extensions 很感兴趣,但我找不到最新的教程。我从Curing the asynchronous blues with the Reactive Extensions for .NET 开始,但它已经过时了。我可以弄清楚一些变化,但我无法让很多示例正常工作。
我在网上找到了很多文章,主要来自 2009,2010,但它们也与当前版本不兼容。我对将 Rx 与 Windows Phone 和 WebClient 一起使用特别感兴趣:
WebClient wc = new WebClient();
var o = Observable.FromEvent<DownloadStringCompletedEventArgs>(wc, "DownloadStringCompleted").Select(newString => newString.EventArgs.Result);
// Subscribe to the observable, and set the label text
o.Subscribe(s => myLabel.Text = s);
// Start the download
wc.DownloadStringAsync(new Uri("http://www.data.com/service"));
不要再工作了,用FromEventPattern替换FromEvent是不够的。
谁能给我指出一个最新的资源?
【问题讨论】:
-
我遇到了类似的问题 - PDF 似乎非常过时,许多方法不再存在,这很遗憾。
标签: c# .net system.reactive