Skip to content

Commit

Permalink
Add back net5.0; and revert changes for streaming APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
IEvangelist committed Jan 30, 2024
1 parent b20f616 commit 0c498d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Microsoft.Kiota.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<AssemblyTitle>Kiota Abstractions Library for dotnet</AssemblyTitle>
<Authors>Microsoft</Authors>
<TargetFrameworks>netstandard2.0;netstandard2.1;net6.0;net7.0;net8.0;</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0;net7.0;net8.0;</TargetFrameworks>
<LangVersion>latest</LangVersion>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageIconUrl>http://go.microsoft.com/fwlink/?LinkID=288890</PackageIconUrl>
Expand Down
4 changes: 3 additions & 1 deletion src/serialization/KiotaSerializer.Deserialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ private static Stream GetStreamFromString(string source)
{
var stream = new MemoryStream();
using var writer = new StreamWriter(stream, Encoding.UTF8, 1024, true);
writer.Write(source);

// Some clients enforce async stream processing.
writer.WriteAsync(source).GetAwaiter().GetResult();
writer.Flush();
stream.Position = 0;
return stream;
Expand Down
4 changes: 3 additions & 1 deletion src/serialization/KiotaSerializer.Serialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ public static partial class KiotaSerializer
private static string GetStringFromStream(Stream stream)
{
using var reader = new StreamReader(stream);
return reader.ReadToEnd();

// Some clients enforce async stream processing.
return reader.ReadToEndAsync().GetAwaiter().GetResult();
}
private static ISerializationWriter GetSerializationWriter(string contentType, object value)
{
Expand Down

0 comments on commit 0c498d9

Please sign in to comment.