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 1
1
// 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.
3
3
4
4
#nullable disable
5
5
@@ -39,7 +39,10 @@ public static bool IsIAsyncEnumerable(Type type)
39
39
{
40
40
if ( type . IsGenericType )
41
41
{
42
- return type . GetGenericTypeDefinition ( ) == typeof ( IAsyncEnumerable < > ) ;
42
+ if ( type . GetGenericTypeDefinition ( ) == typeof ( IAsyncEnumerable < > ) )
43
+ {
44
+ return true ;
45
+ }
43
46
}
44
47
45
48
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