Skip to content

Commit c60d8ed

Browse files
authored
Merge pull request #236 from MihaMarkic/feature/removegetawaiter
Removes GetAwaiter() from KiotaSerializer.GetStringFromStream method
2 parents 56efcdf + 0519bdf commit c60d8ed

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.9.1] - 2024-05-13
11+
12+
### Changed
13+
14+
- Removes GetAwaiter() call in KiotaSerializer.GetStringFromStream and makes it fully synchronous.
15+
1016
## [1.9.0] - 2024-05-06
1117

1218
Adds asynchronous deserialization support and marks synchronous as obsolete. https://github.com/microsoft/kiota-abstractions-dotnet/issues/223

src/Microsoft.Kiota.Abstractions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<PackageProjectUrl>https://aka.ms/kiota/docs</PackageProjectUrl>
1616
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1717
<Deterministic>true</Deterministic>
18-
<VersionPrefix>1.9.0</VersionPrefix>
18+
<VersionPrefix>1.9.1</VersionPrefix>
1919
<VersionSuffix></VersionSuffix>
2020
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2121
<SignAssembly>false</SignAssembly>

src/serialization/KiotaSerializer.Serialization.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public static Task<string> SerializeAsStringAsync<T>(string contentType, IEnumer
101101
private static string GetStringFromStream(Stream stream)
102102
{
103103
using var reader = new StreamReader(stream);
104-
return reader.ReadToEndAsync().ConfigureAwait(false).GetAwaiter().GetResult(); // so the asp.net projects don't get an error
104+
return reader.ReadToEnd();
105105
}
106106
private static async Task<string> GetStringFromStreamAsync(Stream stream, CancellationToken cancellationToken)
107107
{

0 commit comments

Comments
 (0)