From 02ac1949de94251fc255ecea3e6bdd4d526f44bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miha=20Marki=C4=8D?= Date: Fri, 10 May 2024 15:11:08 +0200 Subject: [PATCH 1/3] Removes GetAwaiter() from KiotaSerializer.GetStringFromStream method --- src/serialization/KiotaSerializer.Serialization.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serialization/KiotaSerializer.Serialization.cs b/src/serialization/KiotaSerializer.Serialization.cs index 732b89e4..1a01f2e5 100644 --- a/src/serialization/KiotaSerializer.Serialization.cs +++ b/src/serialization/KiotaSerializer.Serialization.cs @@ -101,7 +101,7 @@ public static Task SerializeAsStringAsync(string contentType, IEnumer private static string GetStringFromStream(Stream stream) { using var reader = new StreamReader(stream); - return reader.ReadToEndAsync().ConfigureAwait(false).GetAwaiter().GetResult(); // so the asp.net projects don't get an error + return reader.ReadToEnd(); } private static async Task GetStringFromStreamAsync(Stream stream, CancellationToken cancellationToken) { From 242fe328afc8d3f79e314c2a16ff7d652f0bd43a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miha=20Marki=C4=8D?= Date: Fri, 10 May 2024 15:14:04 +0200 Subject: [PATCH 2/3] Updates changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index def05faf..3a7644e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Removes GetAwaiter() call in KiotaSerializer.GetStringFromStream and makes it fully synchronous. + ## [1.9.0] - 2024-05-06 Adds asynchronous deserialization support and marks synchronous as obsolete. https://github.com/microsoft/kiota-abstractions-dotnet/issues/223 From 0519bdf63800cc091ba765daea28903da672453f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miha=20Marki=C4=8D?= Date: Fri, 10 May 2024 17:23:58 +0200 Subject: [PATCH 3/3] Bumps version --- CHANGELOG.md | 2 ++ src/Microsoft.Kiota.Abstractions.csproj | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a7644e3..4d17a930 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.9.1] - 2024-05-13 + ### Changed - Removes GetAwaiter() call in KiotaSerializer.GetStringFromStream and makes it fully synchronous. diff --git a/src/Microsoft.Kiota.Abstractions.csproj b/src/Microsoft.Kiota.Abstractions.csproj index dfefc52e..4d83924b 100644 --- a/src/Microsoft.Kiota.Abstractions.csproj +++ b/src/Microsoft.Kiota.Abstractions.csproj @@ -15,7 +15,7 @@ https://aka.ms/kiota/docs true true - 1.9.0 + 1.9.1 true false