Permalink
Browse files

Merge pull request #302 from axelheer/ordered-fix

Let IOrderedAsyncQueryable<T> implement IOrderedAsyncQueryable
2 parents e0b6af3 + d39463c commit 2f275e15419ea81cf0687543d58d95d69269a8d4 @onovotny onovotny committed on GitHub Dec 6, 2016
@@ -14,7 +14,7 @@ public interface IOrderedAsyncQueryable : IAsyncQueryable
/// Ordered asynchronous enumerable sequence represented by an expression tree.
/// </summary>
/// <typeparam name="T">The type of the elements in the sequence.</typeparam>
- public interface IOrderedAsyncQueryable<out T> : IAsyncQueryable<T>
+ public interface IOrderedAsyncQueryable<out T> : IAsyncQueryable<T>, IOrderedAsyncQueryable
{
}
}
@@ -0,0 +1,24 @@
+using System.Linq;
+using Xunit;
+
+namespace Tests
+{
+ public class AsyncEnumerableQueryTest
+ {
+ [Fact]
+ public void CastToUntypedIAsyncQueryable()
+ {
+ var query = Enumerable.Empty<string>().ToAsyncEnumerable().AsAsyncQueryable();
+
+ Assert.IsAssignableFrom<IAsyncQueryable>(query);
+ }
+
+ [Fact]
+ public void CastToUntypedIOrderedAsyncQueryable()
+ {
+ var query = Enumerable.Empty<string>().ToAsyncEnumerable().AsAsyncQueryable().OrderBy(s => s.Length);
+
+ Assert.IsAssignableFrom<IOrderedAsyncQueryable>(query);
+ }
+ }
+}

0 comments on commit 2f275e1

Please sign in to comment.