-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Add support for IAsyncEnumerable<T> where T is value type #17154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
} | ||
|
||
private async Task<ICollection> ReadInternal<T>(IAsyncEnumerable<object> value) | ||
private async Task<ICollection> ReadInternal<T>(object value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is way smaller of a change than I expected.
Assert.Equal(new[] { "0", "1", "2", }, collection); | ||
} | ||
|
||
[Fact] | ||
public async Task ReadAsync_ReadsIAsyncEnumerable_ImplementingMultipleAsyncEnumerableInterfaces() | ||
public async Task TryGetReader_ReturnsReaderForIAsyncEnumerableOfValueType() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎆 👏 👏
} | ||
|
||
[Fact] | ||
public void TryGetReader_ReturnsCachedDelegate() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this behave when a type implements multiple IAsyncEnumerables<>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cache this based on the passed in type, so it just works. I added a test for good measure.
* Add support for IAsyncEnumerable<T> where T is value type Fixes #17139
* Add support for IAsyncEnumerable<T> where T is value type Fixes #17139
Fixes #17139