Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add AsAsync and GetResults

  • Loading branch information...
commit 8c0502f120c62b9b7aa6d6769c73b0f8ad9fee35 1 parent e1193fb
@paulcbetts authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 LinqToAwait/Operators.cs
View
13 LinqToAwait/Operators.cs
@@ -3,8 +3,10 @@
using System.Linq;
using System.Reactive.Linq;
using System.Reactive.Threading.Tasks;
+using System.Reactive.Concurrency;
using System.Text;
using System.Threading.Tasks;
+using System.Threading;
namespace System.Reactive.Linq.ToAwait
{
@@ -39,11 +41,14 @@ public static IObservable<bool> AnyAsync<T>(this IObservable<T> This, Func<T, Ta
.Any(x => x != false);
}
- /*
public static IObservable<T> AsAsync<T>(this IEnumerable<T> This)
{
- return This.ToObservable(TaskScheduler.Current);
+ return This.ToObservable(TaskPoolScheduler.Default);
+ }
+
+ public static IObservable<IList<T>> GetResults<T>(this IObservable<T> This)
+ {
+ return This.ToList();
}
- */
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.