Skip to content

Commit a52832a

Browse files
committed
Adjust TranscodingStream and related code to compile and run here
- add conditions to avoid references to version-specific API - remove references to internal dotnet/runtime code - rewrite some code more generically if performance impact likely minor - use Microsoft.TestCommon instead of directly relying on Xunit in tests - use C# 9.0
1 parent a2472ef commit a52832a

File tree

14 files changed

+740
-319
lines changed

14 files changed

+740
-319
lines changed

src/System.Net.Http.Formatting.NetCore/System.Net.Http.Formatting.NetCore.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
1919
<PackageReference Include="System.ComponentModel.EventBasedAsync" Version="4.3.0" />
2020
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
21+
<PackageReference Include="System.Memory" Version="4.5.5" />
2122
<PackageReference Include="System.Runtime.Serialization.Json" Version="4.3.0" />
2223
<PackageReference Include="System.Runtime.Serialization.Xml" Version="4.3.0" />
24+
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
2325
<PackageReference Include="System.Xml.XmlSerializer" Version="4.3.0" />
2426

2527
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />

src/System.Net.Http.Formatting.NetStandard/System.Net.Http.Formatting.NetStandard.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
</PropertyGroup>
1616

1717
<ItemGroup>
18+
<PackageReference Include="System.Memory" Version="4.5.5" />
19+
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
20+
1821
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
1922
<PackageReference Include="Newtonsoft.Json.Bson" Version="1.0.2" />
2023

src/System.Net.Http.Formatting/Internal/NullableAttributes.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
// From https://github.com/dotnet/runtime/blob/88868b7a781f4e5b9037b8721f30440207a7aa42/src/tools/illink/src/ILLink.RoslynAnalyzer/NullableAttributes.cs
5+
46
namespace System.Diagnostics.CodeAnalysis
57
{
68
#if !NETSTANDARD2_1

0 commit comments

Comments
 (0)