I'm trying to work through Dan Sullivan's Rx Extensions training course on PluralSight. It's excellent stuff but unfortunately Rx seems to have already been changed, even though the course was only published a month ago.
Most of the changes are trivial to work out (change from three dlls to a single dll, change in namespaces used etc) but I'm struggling to understand what I should use in place of Scheduler.Dispatcher in Dan's example. I can't see anything obvious in the properties that are available in the Scheduler.
Here's the code I'm trying to get working with the (refactored?) Rx library (the currenly stable version v1.0.10605)
var query = from number in Enumerable.Range(1, 25) select StringWait(number.ToString());
var observableQuery = query.ToObservable(Scheduler.ThreadPool);
observableQuery.ObserveOn(Scheduler**.Dispatcher**).Subscribe(n => Results.AppendText(string.Format("{0}\n", n)));
What should I be using to invoke the Observer code (Results.AppendText) on the original Dispatcher thread?
The DispatcherScheduler
has been moved to the System.Reactive.Windows.Threading
assembly. If you are using NuGet, it's in Rx-WPF