diff --git a/NuGet.config b/NuGet.config
index 4e8a1f6de1..29b1318efd 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -5,5 +5,6 @@
+
diff --git a/build/common.props b/build/common.props
index 7c10a3ca71..593929425b 100644
--- a/build/common.props
+++ b/build/common.props
@@ -11,10 +11,12 @@
true
$(VersionSuffix)-$(BuildNumber)
true
+ 7.2
+
diff --git a/build/dependencies.props b/build/dependencies.props
index 5f059feb6a..73c5dee642 100644
--- a/build/dependencies.props
+++ b/build/dependencies.props
@@ -2,12 +2,14 @@
2.1.0-*
4.4.0-*
+ 0.1.0-*
2.1.1-*
1.10.0
10.0.1
4.7.49
2.0.0-*
2.0.0-*
+ 2.6.0-rdonly-ref-61915-01
15.3.0-*
2.3.0-beta2-*
diff --git a/samples/LargeResponseApp/LargeResponseApp.csproj b/samples/LargeResponseApp/LargeResponseApp.csproj
index a53054ca27..d147ace444 100644
--- a/samples/LargeResponseApp/LargeResponseApp.csproj
+++ b/samples/LargeResponseApp/LargeResponseApp.csproj
@@ -11,4 +11,8 @@
+
+
+
+
diff --git a/samples/SampleApp/SampleApp.csproj b/samples/SampleApp/SampleApp.csproj
index d08c315d06..9d017fa070 100644
--- a/samples/SampleApp/SampleApp.csproj
+++ b/samples/SampleApp/SampleApp.csproj
@@ -18,6 +18,7 @@
+
diff --git a/src/Kestrel.Core/Adapter/Internal/AdaptedPipeline.cs b/src/Kestrel.Core/Adapter/Internal/AdaptedPipeline.cs
index cf2778603d..8f6db82a0d 100644
--- a/src/Kestrel.Core/Adapter/Internal/AdaptedPipeline.cs
+++ b/src/Kestrel.Core/Adapter/Internal/AdaptedPipeline.cs
@@ -6,7 +6,7 @@ using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal
{
diff --git a/src/Kestrel.Core/Adapter/Internal/RawStream.cs b/src/Kestrel.Core/Adapter/Internal/RawStream.cs
index 94c318a8e3..a2bd9a0078 100644
--- a/src/Kestrel.Core/Adapter/Internal/RawStream.cs
+++ b/src/Kestrel.Core/Adapter/Internal/RawStream.cs
@@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal
{
diff --git a/src/Kestrel.Core/Internal/ConnectionHandler.cs b/src/Kestrel.Core/Internal/ConnectionHandler.cs
index aee910fd25..1d46a91f64 100644
--- a/src/Kestrel.Core/Internal/ConnectionHandler.cs
+++ b/src/Kestrel.Core/Internal/ConnectionHandler.cs
@@ -1,11 +1,10 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using System.IO.Pipelines;
using System.Threading;
using Microsoft.AspNetCore.Hosting.Server;
-using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal
diff --git a/src/Kestrel.Core/Internal/FrameConnection.cs b/src/Kestrel.Core/Internal/FrameConnection.cs
index 0c033b2b9f..ef3c6e15b4 100644
--- a/src/Kestrel.Core/Internal/FrameConnection.cs
+++ b/src/Kestrel.Core/Internal/FrameConnection.cs
@@ -2,11 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
-using System.Globalization;
using System.IO;
+using System.IO.Pipelines;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting.Server;
@@ -14,7 +13,6 @@ using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
using Microsoft.Extensions.Logging;
diff --git a/src/Kestrel.Core/Internal/FrameConnectionContext.cs b/src/Kestrel.Core/Internal/FrameConnectionContext.cs
index 9f01593810..963d353021 100644
--- a/src/Kestrel.Core/Internal/FrameConnectionContext.cs
+++ b/src/Kestrel.Core/Internal/FrameConnectionContext.cs
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
+using System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal
diff --git a/src/Kestrel.Core/Internal/Http/ChunkWriter.cs b/src/Kestrel.Core/Internal/Http/ChunkWriter.cs
index bf34855007..a394fb414e 100644
--- a/src/Kestrel.Core/Internal/Http/ChunkWriter.cs
+++ b/src/Kestrel.Core/Internal/Http/ChunkWriter.cs
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Text;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
diff --git a/src/Kestrel.Core/Internal/Http/Frame.cs b/src/Kestrel.Core/Internal/Http/Frame.cs
index e6b1187438..8c6f648be3 100644
--- a/src/Kestrel.Core/Internal/Http/Frame.cs
+++ b/src/Kestrel.Core/Internal/Http/Frame.cs
@@ -5,18 +5,17 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
+using System.IO.Pipelines;
using System.Linq;
using System.Net;
using System.Runtime.CompilerServices;
using System.Text;
+using System.Text.Encodings.Web.Utf8;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.Text.Encodings.Web.Utf8;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Primitives;
diff --git a/src/Kestrel.Core/Internal/Http/FrameAdapter.cs b/src/Kestrel.Core/Internal/Http/FrameAdapter.cs
index 1418fb8b44..d0a30c0640 100644
--- a/src/Kestrel.Core/Internal/Http/FrameAdapter.cs
+++ b/src/Kestrel.Core/Internal/Http/FrameAdapter.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
diff --git a/src/Kestrel.Core/Internal/Http/FrameContext.cs b/src/Kestrel.Core/Internal/Http/FrameContext.cs
index 2916f8c863..ac5d4de636 100644
--- a/src/Kestrel.Core/Internal/Http/FrameContext.cs
+++ b/src/Kestrel.Core/Internal/Http/FrameContext.cs
@@ -1,8 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
diff --git a/src/Kestrel.Core/Internal/Http/FrameHeaders.Generated.cs b/src/Kestrel.Core/Internal/Http/FrameHeaders.Generated.cs
index 2841efcc87..e4a0ea6d38 100644
--- a/src/Kestrel.Core/Internal/Http/FrameHeaders.Generated.cs
+++ b/src/Kestrel.Core/Internal/Http/FrameHeaders.Generated.cs
@@ -4,7 +4,7 @@
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
using Microsoft.Extensions.Primitives;
using Microsoft.Net.Http.Headers;
diff --git a/src/Kestrel.Core/Internal/Http/FrameRequestHeaders.cs b/src/Kestrel.Core/Internal/Http/FrameRequestHeaders.cs
index d1bfc945e3..241a086ea8 100644
--- a/src/Kestrel.Core/Internal/Http/FrameRequestHeaders.cs
+++ b/src/Kestrel.Core/Internal/Http/FrameRequestHeaders.cs
@@ -6,7 +6,6 @@ using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
using Microsoft.Extensions.Primitives;
using Microsoft.Net.Http.Headers;
diff --git a/src/Kestrel.Core/Internal/Http/FrameResponseHeaders.cs b/src/Kestrel.Core/Internal/Http/FrameResponseHeaders.cs
index 6409f372db..e7dedeb7dd 100644
--- a/src/Kestrel.Core/Internal/Http/FrameResponseHeaders.cs
+++ b/src/Kestrel.Core/Internal/Http/FrameResponseHeaders.cs
@@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.Extensions.Primitives;
using Microsoft.Net.Http.Headers;
diff --git a/src/Kestrel.Core/Internal/Http/HttpParser.cs b/src/Kestrel.Core/Internal/Http/HttpParser.cs
index 3445dc2098..49d3326ec4 100644
--- a/src/Kestrel.Core/Internal/Http/HttpParser.cs
+++ b/src/Kestrel.Core/Internal/Http/HttpParser.cs
@@ -2,10 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Runtime.CompilerServices;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
diff --git a/src/Kestrel.Core/Internal/Http/IHttpHeadersHandler.cs b/src/Kestrel.Core/Internal/Http/IHttpHeadersHandler.cs
index 2cf4789c22..9a322f0da9 100644
--- a/src/Kestrel.Core/Internal/Http/IHttpHeadersHandler.cs
+++ b/src/Kestrel.Core/Internal/Http/IHttpHeadersHandler.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
diff --git a/src/Kestrel.Core/Internal/Http/IHttpParser.cs b/src/Kestrel.Core/Internal/Http/IHttpParser.cs
index 54cdf8e92e..a0a477d0f0 100644
--- a/src/Kestrel.Core/Internal/Http/IHttpParser.cs
+++ b/src/Kestrel.Core/Internal/Http/IHttpParser.cs
@@ -1,7 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
diff --git a/src/Kestrel.Core/Internal/Http/IHttpRequestLineHandler.cs b/src/Kestrel.Core/Internal/Http/IHttpRequestLineHandler.cs
index 4cc1fe7478..ac91138512 100644
--- a/src/Kestrel.Core/Internal/Http/IHttpRequestLineHandler.cs
+++ b/src/Kestrel.Core/Internal/Http/IHttpRequestLineHandler.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
diff --git a/src/Kestrel.Core/Internal/Http/MessageBody.cs b/src/Kestrel.Core/Internal/Http/MessageBody.cs
index 3ce0cd76ea..60e780375e 100644
--- a/src/Kestrel.Core/Internal/Http/MessageBody.cs
+++ b/src/Kestrel.Core/Internal/Http/MessageBody.cs
@@ -3,12 +3,11 @@
using System;
using System.IO;
+using System.IO.Pipelines;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
-using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
diff --git a/src/Kestrel.Core/Internal/Http/OutputProducer.cs b/src/Kestrel.Core/Internal/Http/OutputProducer.cs
index 51ed5c1f67..f84571053d 100644
--- a/src/Kestrel.Core/Internal/Http/OutputProducer.cs
+++ b/src/Kestrel.Core/Internal/Http/OutputProducer.cs
@@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
diff --git a/src/Kestrel.Core/Internal/Http/PathNormalizer.cs b/src/Kestrel.Core/Internal/Http/PathNormalizer.cs
index 7372fcb71a..de076e1849 100644
--- a/src/Kestrel.Core/Internal/Http/PathNormalizer.cs
+++ b/src/Kestrel.Core/Internal/Http/PathNormalizer.cs
@@ -3,7 +3,6 @@
using System;
using System.Diagnostics;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
diff --git a/src/Kestrel.Core/Internal/Http/PipelineExtensions.cs b/src/Kestrel.Core/Internal/Http/PipelineExtensions.cs
index cdc6579650..0f53b2783a 100644
--- a/src/Kestrel.Core/Internal/Http/PipelineExtensions.cs
+++ b/src/Kestrel.Core/Internal/Http/PipelineExtensions.cs
@@ -2,12 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Buffers;
+using System.IO.Pipelines;
using System.Runtime.CompilerServices;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.Buffers;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http
{
diff --git a/src/Kestrel.Core/Internal/Infrastructure/HttpUtilities.cs b/src/Kestrel.Core/Internal/Infrastructure/HttpUtilities.cs
index 0acf137849..8d7e5518c5 100644
--- a/src/Kestrel.Core/Internal/Infrastructure/HttpUtilities.cs
+++ b/src/Kestrel.Core/Internal/Infrastructure/HttpUtilities.cs
@@ -6,7 +6,6 @@ using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Text;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure
{
diff --git a/src/Kestrel.Core/Internal/Infrastructure/IThreadPool.cs b/src/Kestrel.Core/Internal/Infrastructure/IThreadPool.cs
index 92fa225bc8..c78a4db61d 100644
--- a/src/Kestrel.Core/Internal/Infrastructure/IThreadPool.cs
+++ b/src/Kestrel.Core/Internal/Infrastructure/IThreadPool.cs
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Threading;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure
{
diff --git a/src/Kestrel.Core/Internal/RejectionConnection.cs b/src/Kestrel.Core/Internal/RejectionConnection.cs
index cd081b00e7..b14985c499 100644
--- a/src/Kestrel.Core/Internal/RejectionConnection.cs
+++ b/src/Kestrel.Core/Internal/RejectionConnection.cs
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Internal
diff --git a/src/Kestrel.Core/Kestrel.Core.csproj b/src/Kestrel.Core/Kestrel.Core.csproj
index 46181aa528..14304428dc 100644
--- a/src/Kestrel.Core/Kestrel.Core.csproj
+++ b/src/Kestrel.Core/Kestrel.Core.csproj
@@ -23,6 +23,10 @@
+
+
+
+
diff --git a/src/Kestrel.Transport.Abstractions/Internal/IConnectionContext.cs b/src/Kestrel.Transport.Abstractions/Internal/IConnectionContext.cs
index 3ac42175ba..864037e68d 100644
--- a/src/Kestrel.Transport.Abstractions/Internal/IConnectionContext.cs
+++ b/src/Kestrel.Transport.Abstractions/Internal/IConnectionContext.cs
@@ -2,8 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal
{
diff --git a/src/Kestrel.Transport.Abstractions/Internal/IConnectionInformation.cs b/src/Kestrel.Transport.Abstractions/Internal/IConnectionInformation.cs
index fb5d7a4d5c..4004824002 100644
--- a/src/Kestrel.Transport.Abstractions/Internal/IConnectionInformation.cs
+++ b/src/Kestrel.Transport.Abstractions/Internal/IConnectionInformation.cs
@@ -1,8 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using System.IO.Pipelines;
using System.Net;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal
{
diff --git a/src/Kestrel.Transport.Abstractions/Kestrel.Transport.Abstractions.csproj b/src/Kestrel.Transport.Abstractions/Kestrel.Transport.Abstractions.csproj
index 0051d3dabd..64b219c6c4 100644
--- a/src/Kestrel.Transport.Abstractions/Kestrel.Transport.Abstractions.csproj
+++ b/src/Kestrel.Transport.Abstractions/Kestrel.Transport.Abstractions.csproj
@@ -13,16 +13,18 @@
false
true
false
- $(DefineConstants);KESTREL_BY_SOURCE
- $(DefineConstants);SYSTEM_MEMORY
-
-
+
+
+
+
+
+
diff --git a/src/Kestrel.Transport.Libuv/Internal/LibuvConnection.cs b/src/Kestrel.Transport.Libuv/Internal/LibuvConnection.cs
index 2bac70080e..026c0a7fa3 100644
--- a/src/Kestrel.Transport.Libuv/Internal/LibuvConnection.cs
+++ b/src/Kestrel.Transport.Libuv/Internal/LibuvConnection.cs
@@ -2,11 +2,11 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.Buffers;
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.Buffers;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking;
using Microsoft.Extensions.Logging;
@@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal
var currentWritableBuffer = Input.Alloc(MinAllocBufferSize);
_currentWritableBuffer = currentWritableBuffer;
- _bufferHandle = currentWritableBuffer.Buffer.Pin();
+ _bufferHandle = currentWritableBuffer.Buffer.Retain(true);
return handle.Libuv.buf_init((IntPtr)_bufferHandle.PinnedPointer, currentWritableBuffer.Buffer.Length);
}
@@ -180,7 +180,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal
// Cleanup state from last OnAlloc. This is safe even if OnAlloc wasn't called.
_currentWritableBuffer = null;
- _bufferHandle.Free();
+ _bufferHandle.Dispose();
}
private async Task ApplyBackpressureAsync(WritableBufferAwaitable flushTask)
diff --git a/src/Kestrel.Transport.Libuv/Internal/LibuvConnectionContext.cs b/src/Kestrel.Transport.Libuv/Internal/LibuvConnectionContext.cs
index f377aa6bc3..af43c47d3a 100644
--- a/src/Kestrel.Transport.Libuv/Internal/LibuvConnectionContext.cs
+++ b/src/Kestrel.Transport.Libuv/Internal/LibuvConnectionContext.cs
@@ -1,9 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-using System;
using System.Net;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal
diff --git a/src/Kestrel.Transport.Libuv/Internal/LibuvOutputConsumer.cs b/src/Kestrel.Transport.Libuv/Internal/LibuvOutputConsumer.cs
index 957ceb9595..92b3febcd7 100644
--- a/src/Kestrel.Transport.Libuv/Internal/LibuvOutputConsumer.cs
+++ b/src/Kestrel.Transport.Libuv/Internal/LibuvOutputConsumer.cs
@@ -2,8 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Threading.Tasks;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking;
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal
diff --git a/src/Kestrel.Transport.Libuv/Internal/LibuvThread.cs b/src/Kestrel.Transport.Libuv/Internal/LibuvThread.cs
index 299fffef7c..6b27b447ea 100644
--- a/src/Kestrel.Transport.Libuv/Internal/LibuvThread.cs
+++ b/src/Kestrel.Transport.Libuv/Internal/LibuvThread.cs
@@ -4,11 +4,11 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
+using System.IO.Pipelines;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking;
using Microsoft.Extensions.Logging;
diff --git a/src/Kestrel.Transport.Libuv/Internal/Networking/UvWriteReq.cs b/src/Kestrel.Transport.Libuv/Internal/Networking/UvWriteReq.cs
index 05b60ca679..857e98ea75 100644
--- a/src/Kestrel.Transport.Libuv/Internal/Networking/UvWriteReq.cs
+++ b/src/Kestrel.Transport.Libuv/Internal/Networking/UvWriteReq.cs
@@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.Buffers;
using System.Collections.Generic;
using System.Runtime.InteropServices;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.Buffers;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
using Microsoft.Extensions.Logging;
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking
@@ -95,7 +95,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networkin
if (nBuffers == 1)
{
var memory = buffer.First;
- var memoryHandle = memory.Pin();
+ var memoryHandle = memory.Retain(true);
_handles.Add(memoryHandle);
// Fast path for single buffer
@@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networkin
foreach (var memory in buffer)
{
// This won't actually pin the buffer since we're already using pinned memory
- var memoryHandle = memory.Pin();
+ var memoryHandle = memory.Retain(true);
_handles.Add(memoryHandle);
// create and pin each segment being written
@@ -221,7 +221,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networkin
count = handleList.Count;
for (var i = 0; i < count; i++)
{
- handleList[i].Free();
+ handleList[i].Dispose();
}
handleList.Clear();
}
diff --git a/src/Kestrel.Transport.Sockets/SocketConnection.cs b/src/Kestrel.Transport.Sockets/SocketConnection.cs
index 5a3f64d17b..0070f7af89 100644
--- a/src/Kestrel.Transport.Sockets/SocketConnection.cs
+++ b/src/Kestrel.Transport.Sockets/SocketConnection.cs
@@ -8,8 +8,7 @@ using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.Buffers;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets
diff --git a/src/Kestrel.Transport.Sockets/SocketTransportFactory.cs b/src/Kestrel.Transport.Sockets/SocketTransportFactory.cs
index b33ac050a3..849b168342 100644
--- a/src/Kestrel.Transport.Sockets/SocketTransportFactory.cs
+++ b/src/Kestrel.Transport.Sockets/SocketTransportFactory.cs
@@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
using Microsoft.Extensions.Options;
diff --git a/test/Kestrel.Core.Tests/AsciiDecoding.cs b/test/Kestrel.Core.Tests/AsciiDecoding.cs
index 63ed4d4b93..ba61f1bad2 100644
--- a/test/Kestrel.Core.Tests/AsciiDecoding.cs
+++ b/test/Kestrel.Core.Tests/AsciiDecoding.cs
@@ -4,7 +4,6 @@
using System;
using System.Linq;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
using Xunit;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
diff --git a/test/Kestrel.Core.Tests/FrameConnectionTests.cs b/test/Kestrel.Core.Tests/FrameConnectionTests.cs
index faa662f899..9cf86bc7dc 100644
--- a/test/Kestrel.Core.Tests/FrameConnectionTests.cs
+++ b/test/Kestrel.Core.Tests/FrameConnectionTests.cs
@@ -2,6 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
@@ -9,7 +10,6 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Server.Kestrel.Core.Adapter.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Testing;
using Moq;
using Xunit;
diff --git a/test/Kestrel.Core.Tests/FrameResponseHeadersTests.cs b/test/Kestrel.Core.Tests/FrameResponseHeadersTests.cs
index d15fd32099..dabf1d85ee 100644
--- a/test/Kestrel.Core.Tests/FrameResponseHeadersTests.cs
+++ b/test/Kestrel.Core.Tests/FrameResponseHeadersTests.cs
@@ -2,16 +2,13 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Collections.Generic;
using System.Globalization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
-using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
-using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.Primitives;
-using Moq;
using Xunit;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
diff --git a/test/Kestrel.Core.Tests/FrameTests.cs b/test/Kestrel.Core.Tests/FrameTests.cs
index 9531abb48e..64274972b8 100644
--- a/test/Kestrel.Core.Tests/FrameTests.cs
+++ b/test/Kestrel.Core.Tests/FrameTests.cs
@@ -5,6 +5,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
+using System.IO.Pipelines;
using System.Linq;
using System.Text;
using System.Threading;
@@ -16,7 +17,6 @@ using Microsoft.AspNetCore.Server.Kestrel.Core.Features;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Primitives;
diff --git a/test/Kestrel.Core.Tests/HttpParserTests.cs b/test/Kestrel.Core.Tests/HttpParserTests.cs
index ee53a68d7f..d7f54601b2 100644
--- a/test/Kestrel.Core.Tests/HttpParserTests.cs
+++ b/test/Kestrel.Core.Tests/HttpParserTests.cs
@@ -2,15 +2,14 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
+using System.IO.Pipelines.Testing;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines.Testing;
using Microsoft.AspNetCore.Testing;
using Microsoft.Extensions.Logging;
using Moq;
diff --git a/test/Kestrel.Core.Tests/HttpUtilitiesTest.cs b/test/Kestrel.Core.Tests/HttpUtilitiesTest.cs
index 08efbb4d40..af012742cb 100644
--- a/test/Kestrel.Core.Tests/HttpUtilitiesTest.cs
+++ b/test/Kestrel.Core.Tests/HttpUtilitiesTest.cs
@@ -5,7 +5,6 @@ using System;
using System.Text;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
using Xunit;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
diff --git a/test/Kestrel.Core.Tests/KnownStringsTests.cs b/test/Kestrel.Core.Tests/KnownStringsTests.cs
index bbdca711c6..75565d04f4 100644
--- a/test/Kestrel.Core.Tests/KnownStringsTests.cs
+++ b/test/Kestrel.Core.Tests/KnownStringsTests.cs
@@ -7,7 +7,6 @@ using System.Runtime.CompilerServices;
using System.Text;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
using Xunit;
namespace Microsoft.AspNetCore.Server.KestrelTests
diff --git a/test/Kestrel.Core.Tests/OutputProducerTests.cs b/test/Kestrel.Core.Tests/OutputProducerTests.cs
index 027e26f44e..d539a4012c 100644
--- a/test/Kestrel.Core.Tests/OutputProducerTests.cs
+++ b/test/Kestrel.Core.Tests/OutputProducerTests.cs
@@ -2,9 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Testing;
using Moq;
using Xunit;
diff --git a/test/Kestrel.Core.Tests/PathNormalizerTests.cs b/test/Kestrel.Core.Tests/PathNormalizerTests.cs
index 1440c1ba6e..60a1e9b1c9 100644
--- a/test/Kestrel.Core.Tests/PathNormalizerTests.cs
+++ b/test/Kestrel.Core.Tests/PathNormalizerTests.cs
@@ -4,7 +4,6 @@
using System;
using System.Text;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
using Xunit;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
diff --git a/test/Kestrel.Core.Tests/PipeOptionsTests.cs b/test/Kestrel.Core.Tests/PipeOptionsTests.cs
index 56cec36d96..d35ac3c8a4 100644
--- a/test/Kestrel.Core.Tests/PipeOptionsTests.cs
+++ b/test/Kestrel.Core.Tests/PipeOptionsTests.cs
@@ -1,9 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Testing;
using Moq;
using Xunit;
diff --git a/test/Kestrel.Core.Tests/PipelineExtensionTests.cs b/test/Kestrel.Core.Tests/PipelineExtensionTests.cs
index a580b92e06..b79bb20a75 100644
--- a/test/Kestrel.Core.Tests/PipelineExtensionTests.cs
+++ b/test/Kestrel.Core.Tests/PipelineExtensionTests.cs
@@ -2,11 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Text;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Xunit;
namespace Microsoft.AspNetCore.Server.Kestrel.Core.Tests
diff --git a/test/Kestrel.Core.Tests/StreamsTests.cs b/test/Kestrel.Core.Tests/StreamsTests.cs
index b2657bc60a..7b6d73c1c1 100644
--- a/test/Kestrel.Core.Tests/StreamsTests.cs
+++ b/test/Kestrel.Core.Tests/StreamsTests.cs
@@ -2,13 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
-using Microsoft.AspNetCore.Testing;
using Moq;
using Xunit;
diff --git a/test/Kestrel.Core.Tests/TestHelpers/AssertExtensions.cs b/test/Kestrel.Core.Tests/TestHelpers/AssertExtensions.cs
index 1ca99370e5..cb3fc36a3c 100644
--- a/test/Kestrel.Core.Tests/TestHelpers/AssertExtensions.cs
+++ b/test/Kestrel.Core.Tests/TestHelpers/AssertExtensions.cs
@@ -2,7 +2,6 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
using Xunit.Sdk;
namespace Xunit
diff --git a/test/Kestrel.Core.Tests/TestInput.cs b/test/Kestrel.Core.Tests/TestInput.cs
index 1a9cf1620f..ccd07a034a 100644
--- a/test/Kestrel.Core.Tests/TestInput.cs
+++ b/test/Kestrel.Core.Tests/TestInput.cs
@@ -2,10 +2,10 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Text;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Testing;
using Moq;
diff --git a/test/Kestrel.FunctionalTests/SystemdActivation/docker.sh b/test/Kestrel.FunctionalTests/SystemdActivation/docker.sh
index eec694cdd7..1f4a62b3a6 100755
--- a/test/Kestrel.FunctionalTests/SystemdActivation/docker.sh
+++ b/test/Kestrel.FunctionalTests/SystemdActivation/docker.sh
@@ -3,7 +3,8 @@
set -e
scriptDir=$(dirname "${BASH_SOURCE[0]}")
-~/.dotnet/dotnet publish -f netcoreapp2.0 ./samples/SampleApp/
+PATH="$HOME/.dotnet/:$PATH"
+dotnet publish -f netcoreapp2.0 ./samples/SampleApp/
cp -R ./samples/SampleApp/bin/Debug/netcoreapp2.0/publish/ $scriptDir
cp -R ~/.dotnet/ $scriptDir
@@ -11,14 +12,14 @@ image=$(docker build -qf $scriptDir/Dockerfile $scriptDir)
container=$(docker run -Pd $image)
# Try to connect to SampleApp once a second up to 10 times via all available ports.
-for i in {1..10}; do
+for i in {1..10}; do
curl -f http://$(docker port $container 8080/tcp) \
&& curl -f http://$(docker port $container 8081/tcp) \
&& curl -fk https://$(docker port $container 8082/tcp) \
&& curl -f http://$(docker port $container 8083/tcp) \
&& curl -f http://$(docker port $container 8084/tcp) \
&& curl -fk https://$(docker port $container 8085/tcp) \
- && exit 0 || sleep 1;
+ && exit 0 || sleep 1;
done
exit -1
diff --git a/test/Kestrel.Performance/FrameFeatureCollection.cs b/test/Kestrel.Performance/FrameFeatureCollection.cs
index 3d699f795f..6f1ee3d2bf 100644
--- a/test/Kestrel.Performance/FrameFeatureCollection.cs
+++ b/test/Kestrel.Performance/FrameFeatureCollection.cs
@@ -2,12 +2,12 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using BenchmarkDotNet.Attributes;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
{
diff --git a/test/Kestrel.Performance/FrameParsingOverheadBenchmark.cs b/test/Kestrel.Performance/FrameParsingOverheadBenchmark.cs
index 6128d3c955..d570ee1f8d 100644
--- a/test/Kestrel.Performance/FrameParsingOverheadBenchmark.cs
+++ b/test/Kestrel.Performance/FrameParsingOverheadBenchmark.cs
@@ -1,11 +1,11 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using System.IO.Pipelines;
using BenchmarkDotNet.Attributes;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Performance.Mocks;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
diff --git a/test/Kestrel.Performance/FrameWritingBenchmark.cs b/test/Kestrel.Performance/FrameWritingBenchmark.cs
index 5eea9eafb2..664aebe15c 100644
--- a/test/Kestrel.Performance/FrameWritingBenchmark.cs
+++ b/test/Kestrel.Performance/FrameWritingBenchmark.cs
@@ -2,13 +2,13 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Threading;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Testing;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
diff --git a/test/Kestrel.Performance/KestrelHttpParserBenchmark.cs b/test/Kestrel.Performance/KestrelHttpParserBenchmark.cs
index 30238b3223..d1e9d5a7aa 100644
--- a/test/Kestrel.Performance/KestrelHttpParserBenchmark.cs
+++ b/test/Kestrel.Performance/KestrelHttpParserBenchmark.cs
@@ -2,10 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using BenchmarkDotNet.Attributes;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
{
diff --git a/test/Kestrel.Performance/KnownStringsBenchmark.cs b/test/Kestrel.Performance/KnownStringsBenchmark.cs
index 9aa3ffdf53..69bf2d5adb 100644
--- a/test/Kestrel.Performance/KnownStringsBenchmark.cs
+++ b/test/Kestrel.Performance/KnownStringsBenchmark.cs
@@ -6,7 +6,6 @@ using System.Text;
using BenchmarkDotNet.Attributes;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
{
diff --git a/test/Kestrel.Performance/Mocks/MockConnectionInformation.cs b/test/Kestrel.Performance/Mocks/MockConnectionInformation.cs
index fb34c33f51..2f01186143 100644
--- a/test/Kestrel.Performance/Mocks/MockConnectionInformation.cs
+++ b/test/Kestrel.Performance/Mocks/MockConnectionInformation.cs
@@ -1,9 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-using System;
using System.Net;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
diff --git a/test/Kestrel.Performance/Mocks/NullParser.cs b/test/Kestrel.Performance/Mocks/NullParser.cs
index 1484b2af44..ac4e36508c 100644
--- a/test/Kestrel.Performance/Mocks/NullParser.cs
+++ b/test/Kestrel.Performance/Mocks/NullParser.cs
@@ -2,10 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Text;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
{
diff --git a/test/Kestrel.Performance/PipeThroughputBenchmark.cs b/test/Kestrel.Performance/PipeThroughputBenchmark.cs
index 09d79ed693..e4322d2a47 100644
--- a/test/Kestrel.Performance/PipeThroughputBenchmark.cs
+++ b/test/Kestrel.Performance/PipeThroughputBenchmark.cs
@@ -1,9 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using System.IO.Pipelines;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
{
diff --git a/test/Kestrel.Performance/RequestParsingBenchmark.cs b/test/Kestrel.Performance/RequestParsingBenchmark.cs
index c88f9408b2..f155b2a86d 100644
--- a/test/Kestrel.Performance/RequestParsingBenchmark.cs
+++ b/test/Kestrel.Performance/RequestParsingBenchmark.cs
@@ -1,11 +1,11 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using System.IO.Pipelines;
using BenchmarkDotNet.Attributes;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Performance.Mocks;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
diff --git a/test/Kestrel.Performance/ResponseHeaderCollectionBenchmark.cs b/test/Kestrel.Performance/ResponseHeaderCollectionBenchmark.cs
index f4d894a645..8423f95c02 100644
--- a/test/Kestrel.Performance/ResponseHeaderCollectionBenchmark.cs
+++ b/test/Kestrel.Performance/ResponseHeaderCollectionBenchmark.cs
@@ -1,6 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using System.IO.Pipelines;
using System.Runtime.CompilerServices;
using System.Text;
using BenchmarkDotNet.Attributes;
@@ -9,7 +10,6 @@ using Microsoft.AspNetCore.Http.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace Microsoft.AspNetCore.Server.Kestrel.Performance
{
diff --git a/test/Kestrel.Performance/ResponseHeadersWritingBenchmark.cs b/test/Kestrel.Performance/ResponseHeadersWritingBenchmark.cs
index 1daf1b7e45..85929d7211 100644
--- a/test/Kestrel.Performance/ResponseHeadersWritingBenchmark.cs
+++ b/test/Kestrel.Performance/ResponseHeadersWritingBenchmark.cs
@@ -2,7 +2,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.IO;
+using System.IO.Pipelines;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@@ -10,7 +10,6 @@ using BenchmarkDotNet.Attributes;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Performance.Mocks;
using Microsoft.AspNetCore.Testing;
diff --git a/test/Kestrel.Transport.Libuv.Tests/LibuvConnectionTests.cs b/test/Kestrel.Transport.Libuv.Tests/LibuvConnectionTests.cs
index de27f5774d..5f6e341d74 100644
--- a/test/Kestrel.Transport.Libuv.Tests/LibuvConnectionTests.cs
+++ b/test/Kestrel.Transport.Libuv.Tests/LibuvConnectionTests.cs
@@ -2,9 +2,9 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Threading;
using System.Threading.Tasks;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.TestHelpers;
diff --git a/test/Kestrel.Transport.Libuv.Tests/LibuvOutputConsumerTests.cs b/test/Kestrel.Transport.Libuv.Tests/LibuvOutputConsumerTests.cs
index c91ef7994f..973b0e387c 100644
--- a/test/Kestrel.Transport.Libuv.Tests/LibuvOutputConsumerTests.cs
+++ b/test/Kestrel.Transport.Libuv.Tests/LibuvOutputConsumerTests.cs
@@ -3,12 +3,12 @@
using System;
using System.Collections.Concurrent;
+using System.IO.Pipelines;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.TestHelpers;
diff --git a/test/Kestrel.Transport.Libuv.Tests/MultipleLoopTests.cs b/test/Kestrel.Transport.Libuv.Tests/MultipleLoopTests.cs
index e57b16b30a..c079e405cc 100644
--- a/test/Kestrel.Transport.Libuv.Tests/MultipleLoopTests.cs
+++ b/test/Kestrel.Transport.Libuv.Tests/MultipleLoopTests.cs
@@ -2,11 +2,11 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
+using System.IO.Pipelines;
using System.Net;
using System.Net.Sockets;
using System.Runtime.InteropServices;
using System.Threading;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.TestHelpers;
diff --git a/test/Kestrel.Transport.Libuv.Tests/NetworkingTests.cs b/test/Kestrel.Transport.Libuv.Tests/NetworkingTests.cs
index 72aab202ba..0378022eed 100644
--- a/test/Kestrel.Transport.Libuv.Tests/NetworkingTests.cs
+++ b/test/Kestrel.Transport.Libuv.Tests/NetworkingTests.cs
@@ -8,7 +8,7 @@ using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
using Microsoft.AspNetCore.Testing;
using Xunit;
diff --git a/test/Kestrel.Transport.Libuv.Tests/TestHelpers/MockConnectionHandler.cs b/test/Kestrel.Transport.Libuv.Tests/TestHelpers/MockConnectionHandler.cs
index c8b965ef30..a8096d7181 100644
--- a/test/Kestrel.Transport.Libuv.Tests/TestHelpers/MockConnectionHandler.cs
+++ b/test/Kestrel.Transport.Libuv.Tests/TestHelpers/MockConnectionHandler.cs
@@ -2,10 +2,8 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
-using Xunit;
namespace Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.TestHelpers
{
diff --git a/test/shared/MockConnectionInformation.cs b/test/shared/MockConnectionInformation.cs
index 742bcd2aa2..db6ee00fda 100644
--- a/test/shared/MockConnectionInformation.cs
+++ b/test/shared/MockConnectionInformation.cs
@@ -1,8 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using System.IO.Pipelines;
using System.Net;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
namespace Microsoft.AspNetCore.Testing
diff --git a/tools/CodeGenerator/KnownHeaders.cs b/tools/CodeGenerator/KnownHeaders.cs
index b0cdf0b530..16aac8269f 100644
--- a/tools/CodeGenerator/KnownHeaders.cs
+++ b/tools/CodeGenerator/KnownHeaders.cs
@@ -292,7 +292,7 @@ namespace CodeGenerator
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure;
-using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
+using System.IO.Pipelines;
using Microsoft.Extensions.Primitives;
using Microsoft.Net.Http.Headers;