System.Text.Json: Add IAsyncEnumerable support (#50778)
* implement IAsyncEnumerable JsonConverter * Prototype of IAsyncEnumerable deserialize with Stream * Use a Queue + test buffersizes * Avoid 1 item lag * Add support for Serialize * Misc cleanup on test * extend DeserializeAsyncEnumerable test coverage also removes SerializeAsyncEnumerable components * Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Collection/IAsyncEnumerableConverterFactory.cs Co-authored-by: NStephen Toub <stoub@microsoft.com> * address feedback * tweak test buffer values * Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Collection/IAsyncEnumerableOfTConverter.cs Co-authored-by: NStephen Toub <stoub@microsoft.com> * Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Collection/IAsyncEnumerableOfTConverter.cs Co-authored-by: NStephen Toub <stoub@microsoft.com> * address feedback * increase delayInterval in serialization tests * address feedback * address feedback * add test on exceptional IAsyncDisposable disposal * address feedback * Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/ReadAsyncState.cs Co-authored-by: NLayomi Akinrinade <layomia@gmail.com> * Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/WriteStack.cs Co-authored-by: NLayomi Akinrinade <layomia@gmail.com> * fix build and remove dead code * address feedback * Revert unneeded JsonClassInfo.ElementType workaround * remove state allocation on async deserialization methods * remove tooling artifacts * address feedback * reset AsyncEnumeratorIsPendingCompletion field Co-authored-by: NSteve Harter <steveharter@users.noreply.github.com> Co-authored-by: NStephen Toub <stoub@microsoft.com> Co-authored-by: NLayomi Akinrinade <layomia@gmail.com>
Showing
想要评论请 注册 或 登录