How to convert an IEnumerable<Task<T>> to IObservable<T>

.net, .net-4.0, c#, linq, system.reactive

Solution

I believe this will work

tasks.Select(t => Observable.FromAsync(() => t))
     .Merge();

Each task will send its results to the observable sequence in whatever order they complete. You can subscribe to the sequence and do whatever you want with the results that way.

Problem

Is there a built in way to convert an IEnumerable<Task<T>> to an IObservable<T>. Order doesn't matter, just that I get things, though preferably as they're completed. If it doesn't exist yet, what might be a good way to accomplish it?

Original source