Async IObservable enumerator
-
Monday, February 13, 2012 3:44 AM
I wonder if an extension method exists that could be used like this:
IObservable<T> observable = ...
IAsyncEnumerator<T> enumerator = observable.GetAsyncEnumerator();while(await enumerator.MoveNext()) // Could rethrow OnError() exception { T current = enumerator.Current; }
All Replies
-
Monday, February 13, 2012 4:08 AMI'd expect it would be called;
observable.ToAsyncEnumerable()James Miles http://enumeratethis.com
-
Monday, February 13, 2012 4:25 AM
Just checked. It's already in "Interactive Extensions" in the System.Interactive.Async.dll
public static IAsyncEnumerable<TSource> ToAsyncEnumerable<TSource>(this IObservable<TSource> source)
James Miles http://enumeratethis.com
- Proposed As Answer by Dave Sexton Monday, February 13, 2012 4:31 AM
- Marked As Answer by Tamas Flamich Monday, February 13, 2012 1:02 PM
-
Monday, February 13, 2012 1:10 PM
Do you mean this? What is the point of separating features?
http://www.microsoft.com/download/en/details.aspx?id=27203
Does a stable release exist? I read something about that Rx and Ix was not separated before.
-
Monday, February 13, 2012 7:30 PM
Ok, I found out that the stable version of Rx includes Ix too:
http://www.microsoft.com/download/en/details.aspx?id=24940 -
Monday, February 13, 2012 8:18 PM
Hi,
Edit: Yes, it appears that your first link is the latest Ix release.
Your second link is a very old version of Rx. It's not the official stable release.
Currently, Ix is only available in a separate assembly that is considered "experimental".
- Dave
- Edited by Dave Sexton Monday, February 13, 2012 8:22 PM Added confirmation

