Skip to content

Commit

Permalink
Merge pull request #236 from MihaMarkic/feature/removegetawaiter
Browse files Browse the repository at this point in the history
Removes GetAwaiter() from KiotaSerializer.GetStringFromStream method
  • Loading branch information
baywet authored May 10, 2024
2 parents 56efcdf + 0519bdf commit c60d8ed
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ 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.

## [1.9.0] - 2024-05-06

Adds asynchronous deserialization support and marks synchronous as obsolete. https://github.com/microsoft/kiota-abstractions-dotnet/issues/223
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Kiota.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PackageProjectUrl>https://aka.ms/kiota/docs</PackageProjectUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<Deterministic>true</Deterministic>
<VersionPrefix>1.9.0</VersionPrefix>
<VersionPrefix>1.9.1</VersionPrefix>
<VersionSuffix></VersionSuffix>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<SignAssembly>false</SignAssembly>
Expand Down
2 changes: 1 addition & 1 deletion src/serialization/KiotaSerializer.Serialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static Task<string> SerializeAsStringAsync<T>(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<string> GetStringFromStreamAsync(Stream stream, CancellationToken cancellationToken)
{
Expand Down

0 comments on commit c60d8ed

Please sign in to comment.