File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
server/SignalR/test/Internal Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,10 @@ public static bool IsIAsyncEnumerable(Type type)
37
37
{
38
38
if ( type . IsGenericType )
39
39
{
40
- return type . GetGenericTypeDefinition ( ) == typeof ( IAsyncEnumerable < > ) ;
40
+ if ( type . GetGenericTypeDefinition ( ) == typeof ( IAsyncEnumerable < > ) )
41
+ {
42
+ return true ;
43
+ }
41
44
}
42
45
43
46
return type . GetInterfaces ( ) . Any ( t =>
Original file line number Diff line number Diff line change @@ -57,6 +57,12 @@ async IAsyncEnumerable<int> Stream()
57
57
typeof ( CustomAsyncEnumerable ) ,
58
58
true
59
59
} ;
60
+
61
+ yield return new object [ ]
62
+ {
63
+ typeof ( CustomAsyncEnumerableOfT < object > ) ,
64
+ true
65
+ } ;
60
66
}
61
67
62
68
private class CustomAsyncEnumerable : IAsyncEnumerable < object >
@@ -66,5 +72,13 @@ public IAsyncEnumerator<object> GetAsyncEnumerator(CancellationToken cancellatio
66
72
throw new NotImplementedException ( ) ;
67
73
}
68
74
}
75
+
76
+ private class CustomAsyncEnumerableOfT < T > : IAsyncEnumerable < object >
77
+ {
78
+ public IAsyncEnumerator < object > GetAsyncEnumerator ( CancellationToken cancellationToken = default )
79
+ {
80
+ throw new NotImplementedException ( ) ;
81
+ }
82
+ }
69
83
}
70
84
}
You can’t perform that action at this time.
0 commit comments