File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
server/SignalR/test/Internal Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 11// Copyright (c) .NET Foundation. All rights reserved.
2- // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
2+ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
44#nullable disable
55
@@ -39,7 +39,10 @@ public static bool IsIAsyncEnumerable(Type type)
3939 {
4040 if ( type . IsGenericType )
4141 {
42- return type . GetGenericTypeDefinition ( ) == typeof ( IAsyncEnumerable < > ) ;
42+ if ( type . GetGenericTypeDefinition ( ) == typeof ( IAsyncEnumerable < > ) )
43+ {
44+ return true ;
45+ }
4346 }
4447
4548 return type . GetInterfaces ( ) . Any ( t =>
Original file line number Diff line number Diff line change @@ -57,6 +57,12 @@ async IAsyncEnumerable<int> Stream()
5757 typeof ( CustomAsyncEnumerable ) ,
5858 true
5959 } ;
60+
61+ yield return new object [ ]
62+ {
63+ typeof ( CustomAsyncEnumerableOfT < object > ) ,
64+ true
65+ } ;
6066 }
6167
6268 private class CustomAsyncEnumerable : IAsyncEnumerable < object >
@@ -66,5 +72,13 @@ public IAsyncEnumerator<object> GetAsyncEnumerator(CancellationToken cancellatio
6672 throw new NotImplementedException ( ) ;
6773 }
6874 }
75+
76+ private class CustomAsyncEnumerableOfT < T > : IAsyncEnumerable < object >
77+ {
78+ public IAsyncEnumerator < object > GetAsyncEnumerator ( CancellationToken cancellationToken = default )
79+ {
80+ throw new NotImplementedException ( ) ;
81+ }
82+ }
6983 }
7084}
You can’t perform that action at this time.
0 commit comments