Delete dead System.Net.Connections code (#57129)
authorStephen Toub <stoub@microsoft.com>
Tue, 10 Aug 2021 19:11:53 +0000 (15:11 -0400)
committerGitHub <noreply@github.com>
Tue, 10 Aug 2021 19:11:53 +0000 (15:11 -0400)
This never shipped, and won't in .NET 6.  If we decide to bring it back for a future release, it'll involve changes, and we can get whatever base code we want to start with from git history.  We don't need all of this to end up in an LTS branch.

32 files changed:
src/libraries/System.Net.Connections/Directory.Build.props [deleted file]
src/libraries/System.Net.Connections/System.Net.Connections.sln [deleted file]
src/libraries/System.Net.Connections/ref/System.Net.Connections.cs [deleted file]
src/libraries/System.Net.Connections/ref/System.Net.Connections.csproj [deleted file]
src/libraries/System.Net.Connections/src/Resources/Strings.resx [deleted file]
src/libraries/System.Net.Connections/src/System.Net.Connections.csproj [deleted file]
src/libraries/System.Net.Connections/src/System/Net/Connections/Connection.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionBase.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionCloseMethod.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionExtensions.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionFactory.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionListener.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionListenerFactory.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/Connections/DuplexPipeStream.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/Connections/DuplexStreamPipe.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/Connections/IConnectionProperties.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/Connections/Sockets/SocketConnection.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/Connections/Sockets/SocketsConnectionFactory.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/NetworkError.cs [deleted file]
src/libraries/System.Net.Connections/src/System/Net/NetworkException.cs [deleted file]
src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/ConnectionBaseTest.cs [deleted file]
src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/ConnectionTest.cs [deleted file]
src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/ConnectionWithoutStreamOrPipe.cs [deleted file]
src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockConnection.cs [deleted file]
src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockPipe.cs [deleted file]
src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockPipeReader.cs [deleted file]
src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockPipeWriter.cs [deleted file]
src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockStream.cs [deleted file]
src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/Sockets/SocketsConnectionFactoryTests.cs [deleted file]
src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/Sockets/SocketsConnectionFactoryTests_DerivedFactory.cs [deleted file]
src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/System.Net.Connections.Tests.csproj [deleted file]
src/tests/Common/scripts/crossgen2_comparison.py

diff --git a/src/libraries/System.Net.Connections/Directory.Build.props b/src/libraries/System.Net.Connections/Directory.Build.props
deleted file mode 100644 (file)
index 0a5c846..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<Project>
-  <Import Project="..\Directory.Build.props" />
-  <PropertyGroup>
-    <StrongNameKeyId>Microsoft</StrongNameKeyId>
-    <UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
-  </PropertyGroup>
-</Project>
\ No newline at end of file
diff --git a/src/libraries/System.Net.Connections/System.Net.Connections.sln b/src/libraries/System.Net.Connections/System.Net.Connections.sln
deleted file mode 100644 (file)
index 87cc488..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtilities", "..\Common\tests\TestUtilities\TestUtilities.csproj", "{6118B5D2-34F5-47F1-B26C-7678BB4F73D4}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Pipelines", "..\System.IO.Pipelines\ref\System.IO.Pipelines.csproj", "{5885A39B-9961-4BB9-B691-908242D6D919}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.IO.Pipelines", "..\System.IO.Pipelines\src\System.IO.Pipelines.csproj", "{6A9746CA-61E6-44FE-BBC2-1CF1F1BBCA57}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Connections", "ref\System.Net.Connections.csproj", "{4409894C-70E1-4383-8CCA-47D02096CACF}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Connections", "src\System.Net.Connections.csproj", "{5926F11C-5844-4A50-8BC7-ADE1E1568BEF}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Net.Connections.Tests", "tests\System.Net.Connections.Tests\System.Net.Connections.Tests.csproj", "{995314C3-6467-4DE6-900D-B8933311833E}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.CompilerServices.Unsafe", "..\System.Runtime.CompilerServices.Unsafe\ref\System.Runtime.CompilerServices.Unsafe.csproj", "{A1589642-F094-433D-B00D-016A969CE0C3}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.CompilerServices.Unsafe", "..\System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj", "{26AFA44E-9D50-4459-8F78-A6D2B73480F0}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BF5BAD99-B3E9-4E18-B84C-D4C25D0EEC92}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{DC05C6C2-5FEE-417B-95A2-F424967A23FD}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{89A9E9DF-B356-4C3A-A6AE-C6249E93E546}"
-EndProject
-Global
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               Debug|Any CPU = Debug|Any CPU
-               Release|Any CPU = Release|Any CPU
-       EndGlobalSection
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {995314C3-6467-4DE6-900D-B8933311833E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {995314C3-6467-4DE6-900D-B8933311833E}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {995314C3-6467-4DE6-900D-B8933311833E}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {995314C3-6467-4DE6-900D-B8933311833E}.Release|Any CPU.Build.0 = Release|Any CPU
-               {4409894C-70E1-4383-8CCA-47D02096CACF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {4409894C-70E1-4383-8CCA-47D02096CACF}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {4409894C-70E1-4383-8CCA-47D02096CACF}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {4409894C-70E1-4383-8CCA-47D02096CACF}.Release|Any CPU.Build.0 = Release|Any CPU
-               {5926F11C-5844-4A50-8BC7-ADE1E1568BEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {5926F11C-5844-4A50-8BC7-ADE1E1568BEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {5926F11C-5844-4A50-8BC7-ADE1E1568BEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {5926F11C-5844-4A50-8BC7-ADE1E1568BEF}.Release|Any CPU.Build.0 = Release|Any CPU
-               {6118B5D2-34F5-47F1-B26C-7678BB4F73D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {6118B5D2-34F5-47F1-B26C-7678BB4F73D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {6118B5D2-34F5-47F1-B26C-7678BB4F73D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {6118B5D2-34F5-47F1-B26C-7678BB4F73D4}.Release|Any CPU.Build.0 = Release|Any CPU
-               {5885A39B-9961-4BB9-B691-908242D6D919}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {5885A39B-9961-4BB9-B691-908242D6D919}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {5885A39B-9961-4BB9-B691-908242D6D919}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {5885A39B-9961-4BB9-B691-908242D6D919}.Release|Any CPU.Build.0 = Release|Any CPU
-               {6A9746CA-61E6-44FE-BBC2-1CF1F1BBCA57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {6A9746CA-61E6-44FE-BBC2-1CF1F1BBCA57}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {6A9746CA-61E6-44FE-BBC2-1CF1F1BBCA57}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {6A9746CA-61E6-44FE-BBC2-1CF1F1BBCA57}.Release|Any CPU.Build.0 = Release|Any CPU
-               {26AFA44E-9D50-4459-8F78-A6D2B73480F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {26AFA44E-9D50-4459-8F78-A6D2B73480F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {26AFA44E-9D50-4459-8F78-A6D2B73480F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {26AFA44E-9D50-4459-8F78-A6D2B73480F0}.Release|Any CPU.Build.0 = Release|Any CPU
-               {A1589642-F094-433D-B00D-016A969CE0C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {A1589642-F094-433D-B00D-016A969CE0C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {A1589642-F094-433D-B00D-016A969CE0C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {A1589642-F094-433D-B00D-016A969CE0C3}.Release|Any CPU.Build.0 = Release|Any CPU
-       EndGlobalSection
-       GlobalSection(SolutionProperties) = preSolution
-               HideSolutionNode = FALSE
-       EndGlobalSection
-       GlobalSection(NestedProjects) = preSolution
-               {995314C3-6467-4DE6-900D-B8933311833E} = {BF5BAD99-B3E9-4E18-B84C-D4C25D0EEC92}
-               {6118B5D2-34F5-47F1-B26C-7678BB4F73D4} = {BF5BAD99-B3E9-4E18-B84C-D4C25D0EEC92}
-               {4409894C-70E1-4383-8CCA-47D02096CACF} = {DC05C6C2-5FEE-417B-95A2-F424967A23FD}
-               {5885A39B-9961-4BB9-B691-908242D6D919} = {DC05C6C2-5FEE-417B-95A2-F424967A23FD}
-               {A1589642-F094-433D-B00D-016A969CE0C3} = {DC05C6C2-5FEE-417B-95A2-F424967A23FD}
-               {5926F11C-5844-4A50-8BC7-ADE1E1568BEF} = {89A9E9DF-B356-4C3A-A6AE-C6249E93E546}
-               {6A9746CA-61E6-44FE-BBC2-1CF1F1BBCA57} = {89A9E9DF-B356-4C3A-A6AE-C6249E93E546}
-               {26AFA44E-9D50-4459-8F78-A6D2B73480F0} = {89A9E9DF-B356-4C3A-A6AE-C6249E93E546}
-       EndGlobalSection
-       GlobalSection(ExtensibilityGlobals) = postSolution
-               SolutionGuid = {11EE8A01-4C1F-40E0-84D0-6E1D8FD450D3}
-       EndGlobalSection
-EndGlobal
diff --git a/src/libraries/System.Net.Connections/ref/System.Net.Connections.cs b/src/libraries/System.Net.Connections/ref/System.Net.Connections.cs
deleted file mode 100644 (file)
index feca258..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// ------------------------------------------------------------------------------
-// Changes to this file must follow the https://aka.ms/api-review process.
-// ------------------------------------------------------------------------------
-
-namespace System.Net.Connections
-{
-    public abstract partial class Connection : System.Net.Connections.ConnectionBase
-    {
-        protected Connection() { }
-        public System.IO.Pipelines.IDuplexPipe Pipe { get { throw null; } }
-        public System.IO.Stream Stream { get { throw null; } }
-        protected virtual System.IO.Pipelines.IDuplexPipe CreatePipe() { throw null; }
-        protected virtual System.IO.Stream CreateStream() { throw null; }
-        public static System.Net.Connections.Connection FromPipe(System.IO.Pipelines.IDuplexPipe pipe, bool leaveOpen = false, System.Net.Connections.IConnectionProperties? properties = null, System.Net.EndPoint? localEndPoint = null, System.Net.EndPoint? remoteEndPoint = null) { throw null; }
-        public static System.Net.Connections.Connection FromStream(System.IO.Stream stream, bool leaveOpen = false, System.Net.Connections.IConnectionProperties? properties = null, System.Net.EndPoint? localEndPoint = null, System.Net.EndPoint? remoteEndPoint = null) { throw null; }
-    }
-    public abstract partial class ConnectionBase : System.IAsyncDisposable, System.IDisposable
-    {
-        protected ConnectionBase() { }
-        public abstract System.Net.Connections.IConnectionProperties ConnectionProperties { get; }
-        public abstract System.Net.EndPoint? LocalEndPoint { get; }
-        public abstract System.Net.EndPoint? RemoteEndPoint { get; }
-        public System.Threading.Tasks.ValueTask CloseAsync(System.Net.Connections.ConnectionCloseMethod method = System.Net.Connections.ConnectionCloseMethod.GracefulShutdown, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
-        protected abstract System.Threading.Tasks.ValueTask CloseAsyncCore(System.Net.Connections.ConnectionCloseMethod method, System.Threading.CancellationToken cancellationToken);
-        public void Dispose() { }
-        public System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
-    }
-    public enum ConnectionCloseMethod
-    {
-        GracefulShutdown = 0,
-        Abort = 1,
-        Immediate = 2,
-    }
-    public static partial class ConnectionExtensions
-    {
-        public static System.Net.Connections.ConnectionFactory Filter(this System.Net.Connections.ConnectionFactory factory, System.Func<System.Net.Connections.Connection, System.Net.Connections.IConnectionProperties?, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<System.Net.Connections.Connection>> filter) { throw null; }
-        public static bool TryGet<T>(this System.Net.Connections.IConnectionProperties properties, [System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute(false)] out T property) { throw null; }
-    }
-    public abstract partial class ConnectionFactory : System.IAsyncDisposable, System.IDisposable
-    {
-        protected ConnectionFactory() { }
-        public abstract System.Threading.Tasks.ValueTask<System.Net.Connections.Connection> ConnectAsync(System.Net.EndPoint? endPoint, System.Net.Connections.IConnectionProperties? options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
-        public void Dispose() { }
-        protected virtual void Dispose(bool disposing) { }
-        public System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
-        protected virtual System.Threading.Tasks.ValueTask DisposeAsyncCore() { throw null; }
-    }
-    public abstract partial class ConnectionListener : System.IAsyncDisposable, System.IDisposable
-    {
-        protected ConnectionListener() { }
-        public abstract System.Net.Connections.IConnectionProperties ListenerProperties { get; }
-        public abstract System.Net.EndPoint? LocalEndPoint { get; }
-        public abstract System.Threading.Tasks.ValueTask<System.Net.Connections.Connection?> AcceptAsync(System.Net.Connections.IConnectionProperties? options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
-        public void Dispose() { }
-        protected virtual void Dispose(bool disposing) { }
-        public System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
-        protected virtual System.Threading.Tasks.ValueTask DisposeAsyncCore() { throw null; }
-    }
-    public abstract partial class ConnectionListenerFactory : System.IAsyncDisposable, System.IDisposable
-    {
-        protected ConnectionListenerFactory() { }
-        public abstract System.Threading.Tasks.ValueTask<System.Net.Connections.ConnectionListener> ListenAsync(System.Net.EndPoint? endPoint, System.Net.Connections.IConnectionProperties? options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
-        public void Dispose() { }
-        protected virtual void Dispose(bool disposing) { }
-        public System.Threading.Tasks.ValueTask DisposeAsync() { throw null; }
-        protected virtual System.Threading.Tasks.ValueTask DisposeAsyncCore() { throw null; }
-    }
-    public partial interface IConnectionProperties
-    {
-        bool TryGet(System.Type propertyKey, [System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] out object? property);
-    }
-    public partial class SocketsConnectionFactory : System.Net.Connections.ConnectionFactory
-    {
-        public SocketsConnectionFactory(System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) { }
-        public SocketsConnectionFactory(System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType) { }
-        public override System.Threading.Tasks.ValueTask<System.Net.Connections.Connection> ConnectAsync(System.Net.EndPoint? endPoint, System.Net.Connections.IConnectionProperties? options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
-        protected virtual System.Net.Sockets.Socket CreateSocket(System.Net.Sockets.AddressFamily addressFamily, System.Net.Sockets.SocketType socketType, System.Net.Sockets.ProtocolType protocolType, System.Net.EndPoint? endPoint, System.Net.Connections.IConnectionProperties? options) { throw null; }
-    }
-}
-namespace System.Net
-{
-    public enum NetworkError : int
-    {
-        Other = 0,
-        EndPointInUse,
-        HostNotFound,
-        TimedOut,
-        ConnectionRefused,
-        OperationAborted,
-        ConnectionAborted,
-        ConnectionReset,
-    }
-    public class NetworkException : System.IO.IOException
-    {
-        public NetworkException(NetworkError error, Exception? innerException = null) { }
-        public NetworkException(string message, NetworkError error, Exception? innerException = null) { }
-        protected NetworkException(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
-        public NetworkError NetworkError { get { throw null; } }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/ref/System.Net.Connections.csproj b/src/libraries/System.Net.Connections/ref/System.Net.Connections.csproj
deleted file mode 100644 (file)
index fa3a6d8..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
-    <Nullable>enable</Nullable>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="System.Net.Connections.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
-    <ProjectReference Include="..\..\System.Net.Primitives\ref\System.Net.Primitives.csproj" />
-    <ProjectReference Include="..\..\System.Net.Sockets\ref\System.Net.Sockets.csproj" />
-    <ProjectReference Include="..\..\System.IO.Pipelines\ref\System.IO.Pipelines.csproj" />
-  </ItemGroup>
-</Project>
diff --git a/src/libraries/System.Net.Connections/src/Resources/Strings.resx b/src/libraries/System.Net.Connections/src/Resources/Strings.resx
deleted file mode 100644 (file)
index 004c0da..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <data name="net_connections_createpipe_null" xml:space="preserve">
-    <value>The CreatePipe implementation returned null; a valid reference was expected.</value>
-  </data>
-  <data name="net_connections_createstream_null" xml:space="preserve">
-    <value>The CreateStream implementation returned null; a valid reference was expected.</value>
-  </data>
-  <data name="net_connections_no_create_overrides" xml:space="preserve">
-    <value>One of CreatePipe or CreateStream must be implemented</value>
-  </data>
-  <data name="net_connections_pipe_use_after_stream" xml:space="preserve">
-    <value>The Connection's Pipe may not be accessed after Stream has been accessed.</value>
-  </data>
-  <data name="net_connections_stream_use_after_pipe" xml:space="preserve">
-    <value>The Connection's Stream may not be accessed after Pipe has been accessed.</value>
-  </data>
-  <data name="net_connections_zero_byte_pipe_read" xml:space="preserve">
-    <value>The PipeReader returned a zero-length  read.</value>
-  </data>
-</root>
\ No newline at end of file
diff --git a/src/libraries/System.Net.Connections/src/System.Net.Connections.csproj b/src/libraries/System.Net.Connections/src/System.Net.Connections.csproj
deleted file mode 100644 (file)
index 055eaef..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-  <PropertyGroup>
-    <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
-    <Nullable>enable</Nullable>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="$(CommonPath)System\Net\NetworkErrorHelper.cs" Link="Common\System\Net\NetworkErrorHelper.cs" />
-    <Compile Include="$(CommonPath)System\Threading\Tasks\TaskToApm.cs" Link="Common\System\Threading\Tasks\TaskToApm.cs" />
-    <Compile Include="System\Net\NetworkError.cs" />
-    <Compile Include="System\Net\NetworkException.cs" />
-    <Compile Include="System\Net\Connections\ConnectionBase.cs" />
-    <Compile Include="System\Net\Connections\ConnectionCloseMethod.cs" />
-    <Compile Include="System\Net\Connections\ConnectionExtensions.cs" />
-    <Compile Include="System\Net\Connections\ConnectionListenerFactory.cs" />
-    <Compile Include="System\Net\Connections\Connection.cs" />
-    <Compile Include="System\Net\Connections\DuplexPipeStream.cs" />
-    <Compile Include="System\Net\Connections\ConnectionFactory.cs" />
-    <Compile Include="System\Net\Connections\ConnectionListener.cs" />
-    <Compile Include="System\Net\Connections\DuplexStreamPipe.cs" />
-    <Compile Include="System\Net\Connections\IConnectionProperties.cs" />
-    <Compile Include="System\Net\Connections\Sockets\SocketConnection.cs" />
-    <Compile Include="System\Net\Connections\Sockets\SocketsConnectionFactory.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\System.IO.Pipelines\ref\System.IO.Pipelines.csproj" />
-    <Reference Include="System.Runtime" />
-    <Reference Include="System.Memory" />
-    <Reference Include="System.Net.Primitives" />
-    <Reference Include="System.Net.Sockets" />
-    <Reference Include="System.Threading" />
-    <Reference Include="System.Threading.Tasks" />
-    <Reference Include="Microsoft.Win32.Primitives" />
-  </ItemGroup>
-</Project>
diff --git a/src/libraries/System.Net.Connections/src/System/Net/Connections/Connection.cs b/src/libraries/System.Net.Connections/src/System/Net/Connections/Connection.cs
deleted file mode 100644 (file)
index f68bac2..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.IO;
-using System.IO.Pipelines;
-using System.Runtime.ExceptionServices;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections
-{
-    /// <summary>
-    /// A connection.
-    /// </summary>
-    public abstract class Connection : ConnectionBase
-    {
-        private Stream? _stream;
-        private IDuplexPipe? _pipe;
-        private bool _initializing;
-
-        /// <summary>
-        /// The connection's <see cref="Stream"/>.
-        /// </summary>
-        public Stream Stream =>
-            _stream != null ? _stream :
-            _pipe != null ? throw new InvalidOperationException(SR.net_connections_stream_use_after_pipe) :
-            (_stream = CreateStream() ?? throw new InvalidOperationException(SR.net_connections_createstream_null));
-
-        /// <summary>
-        /// The connection's <see cref="IDuplexPipe"/>.
-        /// </summary>
-        public IDuplexPipe Pipe =>
-            _pipe != null ? _pipe :
-            _stream != null ? throw new InvalidOperationException(SR.net_connections_pipe_use_after_stream) :
-            (_pipe = CreatePipe() ?? throw new InvalidOperationException(SR.net_connections_createpipe_null));
-
-        /// <summary>
-        /// Initializes the <see cref="Stream"/> for the <see cref="Connection"/>.
-        /// </summary>
-        /// <returns>A <see cref="Stream"/>.</returns>
-        /// <remarks>
-        /// At least one of <see cref="CreateStream"/> and <see cref="CreatePipe"/> must be overridden.
-        /// If only <see cref="CreateStream"/> is overridden, a user accessing <see cref="Pipe"/> will get a <see cref="IDuplexPipe"/> wrapping the <see cref="Stream"/>.
-        /// </remarks>
-        protected virtual Stream CreateStream()
-        {
-            if (_initializing) throw new InvalidOperationException(SR.net_connections_no_create_overrides);
-
-            try
-            {
-                _initializing = true;
-
-                IDuplexPipe pipe = CreatePipe();
-                if (pipe == null) throw new InvalidOperationException(SR.net_connections_createpipe_null);
-
-                return new DuplexPipeStream(pipe);
-            }
-            finally
-            {
-                _initializing = false;
-            }
-        }
-
-        /// <summary>
-        /// Initializes the <see cref="Pipe"/> for the <see cref="Connection"/>.
-        /// </summary>
-        /// <returns>An <see cref="IDuplexPipe"/>.</returns>
-        /// <remarks>
-        /// At least one of <see cref="CreateStream"/> and <see cref="CreatePipe"/> must be overridden.
-        /// If only <see cref="CreatePipe"/> is overridden, a user accessing <see cref="Stream"/> will get a <see cref="Stream"/> wrapping the <see cref="Pipe"/>.
-        /// </remarks>
-        protected virtual IDuplexPipe CreatePipe()
-        {
-            if (_initializing) throw new InvalidOperationException(SR.net_connections_no_create_overrides);
-
-            try
-            {
-                _initializing = true;
-
-                Stream stream = CreateStream();
-                if (stream == null) throw new InvalidOperationException(SR.net_connections_createstream_null);
-
-                return new DuplexStreamPipe(stream);
-            }
-            finally
-            {
-                _initializing = false;
-            }
-        }
-
-        /// <summary>
-        /// Creates a connection for a <see cref="Stream"/>.
-        /// </summary>
-        /// <param name="stream">The connection's <see cref="Connection.Stream"/>.</param>
-        /// <param name="leaveOpen">If false, the <paramref name="stream"/> will be disposed of once the connection has been closed.</param>
-        /// <param name="properties">The connection's <see cref="ConnectionBase.ConnectionProperties"/>.</param>
-        /// <param name="localEndPoint">The connection's <see cref="ConnectionBase.LocalEndPoint"/>.</param>
-        /// <param name="remoteEndPoint">The connection's <see cref="ConnectionBase.RemoteEndPoint"/>.</param>
-        /// <returns>A new <see cref="Connection"/>.</returns>
-        public static Connection FromStream(Stream stream, bool leaveOpen = false, IConnectionProperties? properties = null, EndPoint? localEndPoint = null, EndPoint? remoteEndPoint = null)
-        {
-            if (stream == null) throw new ArgumentNullException(nameof(stream));
-            return new ConnectionFromStream(stream, leaveOpen, properties, localEndPoint, remoteEndPoint);
-        }
-
-        /// <summary>
-        /// Creates a connection for an <see cref="IDuplexPipe"/>.
-        /// </summary>
-        /// <param name="pipe">The connection's <see cref="Connection.Pipe"/>.</param>
-        /// <param name="leaveOpen">If false and the <paramref name="pipe"/> implements <see cref="IAsyncDisposable"/> or <see cref="IDisposable"/>, it will be disposed of once the connection has been closed.</param>
-        /// <param name="properties">The connection's <see cref="ConnectionBase.ConnectionProperties"/>.</param>
-        /// <param name="localEndPoint">The connection's <see cref="ConnectionBase.LocalEndPoint"/>.</param>
-        /// <param name="remoteEndPoint">The connection's <see cref="ConnectionBase.RemoteEndPoint"/>.</param>
-        /// <returns>A new <see cref="Connection"/>.</returns>
-        public static Connection FromPipe(IDuplexPipe pipe, bool leaveOpen = false, IConnectionProperties? properties = null, EndPoint? localEndPoint = null, EndPoint? remoteEndPoint = null)
-        {
-            if (pipe == null) throw new ArgumentNullException(nameof(pipe));
-            return new ConnectionFromPipe(pipe, leaveOpen, properties, localEndPoint, remoteEndPoint);
-        }
-
-        private sealed class ConnectionFromStream : Connection, IConnectionProperties
-        {
-            private Stream? _originalStream;
-            private IConnectionProperties? _properties;
-            private readonly bool _leaveOpen;
-
-            public override IConnectionProperties ConnectionProperties => _properties ?? this;
-
-            public override EndPoint? LocalEndPoint { get; }
-
-            public override EndPoint? RemoteEndPoint { get; }
-
-            public ConnectionFromStream(Stream stream, bool leaveOpen, IConnectionProperties? properties, EndPoint? localEndPoint, EndPoint? remoteEndPoint)
-            {
-                _originalStream = stream;
-                _leaveOpen = leaveOpen;
-                _properties = properties;
-                LocalEndPoint = localEndPoint;
-                RemoteEndPoint = remoteEndPoint;
-            }
-
-            protected override Stream CreateStream() => _originalStream ?? throw new ObjectDisposedException(nameof(Connection));
-
-            protected override async ValueTask CloseAsyncCore(ConnectionCloseMethod method, CancellationToken cancellationToken)
-            {
-                if (_originalStream == null)
-                {
-                    return;
-                }
-
-                if (method == ConnectionCloseMethod.GracefulShutdown)
-                {
-                    await _originalStream.FlushAsync(cancellationToken).ConfigureAwait(false);
-                }
-
-                if (!_leaveOpen)
-                {
-                    await _originalStream.DisposeAsync().ConfigureAwait(false);
-                }
-
-                _originalStream = null;
-            }
-
-            bool IConnectionProperties.TryGet(Type propertyKey, [NotNullWhen(true)] out object? property)
-            {
-                property = null;
-                return false;
-            }
-        }
-
-        private sealed class ConnectionFromPipe : Connection, IConnectionProperties
-        {
-            private IDuplexPipe? _originalPipe;
-            private IConnectionProperties? _properties;
-            private readonly bool _leaveOpen;
-
-            public override IConnectionProperties ConnectionProperties => _properties ?? this;
-
-            public override EndPoint? LocalEndPoint { get; }
-
-            public override EndPoint? RemoteEndPoint { get; }
-
-            public ConnectionFromPipe(IDuplexPipe pipe, bool leaveOpen, IConnectionProperties? properties, EndPoint? localEndPoint, EndPoint? remoteEndPoint)
-            {
-                _originalPipe = pipe;
-                _leaveOpen = leaveOpen;
-                _properties = properties;
-                LocalEndPoint = localEndPoint;
-                RemoteEndPoint = remoteEndPoint;
-            }
-
-            protected override IDuplexPipe CreatePipe() => _originalPipe ?? throw new ObjectDisposedException(nameof(Connection));
-
-            protected override async ValueTask CloseAsyncCore(ConnectionCloseMethod method, CancellationToken cancellationToken)
-            {
-                if (_originalPipe == null)
-                {
-                    return;
-                }
-
-                Exception? inputException, outputException;
-
-                if (method == ConnectionCloseMethod.GracefulShutdown)
-                {
-                    // Flush happens implicitly from CompleteAsync(null), so only flush here if we need cancellation.
-                    if (cancellationToken.CanBeCanceled)
-                    {
-                        FlushResult r = await _originalPipe.Output.FlushAsync(cancellationToken).ConfigureAwait(false);
-                        if (r.IsCanceled) cancellationToken.ThrowIfCancellationRequested();
-                    }
-
-                    inputException = null;
-                    outputException = null;
-                }
-                else
-                {
-                    inputException = ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(nameof(Connection)));
-                    outputException = ExceptionDispatchInfo.SetCurrentStackTrace(new ObjectDisposedException(nameof(Connection)));
-                }
-
-                await _originalPipe.Input.CompleteAsync(inputException).ConfigureAwait(false);
-                await _originalPipe.Output.CompleteAsync(outputException).ConfigureAwait(false);
-
-                if (!_leaveOpen)
-                {
-                    switch (_originalPipe)
-                    {
-                        case IAsyncDisposable d:
-                            await d.DisposeAsync().ConfigureAwait(false);
-                            break;
-                        case IDisposable d:
-                            d.Dispose();
-                            break;
-                    }
-                }
-
-                _originalPipe = null;
-            }
-
-            bool IConnectionProperties.TryGet(Type propertyKey, [NotNullWhen(true)] out object? property)
-            {
-                property = null;
-                return false;
-            }
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionBase.cs b/src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionBase.cs
deleted file mode 100644 (file)
index 027431b..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections
-{
-    /// <summary>
-    /// Provides base functionality shared between singular (e.g. TCP) and multiplexed (e.g. QUIC) connections.
-    /// </summary>
-    public abstract class ConnectionBase : IDisposable, IAsyncDisposable
-    {
-        private bool _disposed;
-
-        /// <summary>
-        /// Properties exposed by this connection.
-        /// </summary>
-        public abstract IConnectionProperties ConnectionProperties { get; }
-
-        /// <summary>
-        /// The local endpoint of this connection, if any.
-        /// </summary>
-        public abstract EndPoint? LocalEndPoint { get; }
-
-        /// <summary>
-        /// The remote endpoint of this connection, if any.
-        /// </summary>
-        public abstract EndPoint? RemoteEndPoint { get; }
-
-        /// <summary>
-        /// Closes the connection.
-        /// </summary>
-        /// <param name="method">The method to use when closing the connection.</param>
-        /// <param name="cancellationToken">A cancellation token for the asynchronous operation.</param>
-        /// <returns>A <see cref="ValueTask"/> for the asynchronous operation.</returns>
-        public async ValueTask CloseAsync(ConnectionCloseMethod method = ConnectionCloseMethod.GracefulShutdown, CancellationToken cancellationToken = default)
-        {
-            if (!_disposed)
-            {
-                await CloseAsyncCore(method, cancellationToken).ConfigureAwait(false);
-                _disposed = true;
-            }
-            GC.SuppressFinalize(this);
-        }
-
-        /// <summary>
-        /// Closes the connection.
-        /// </summary>
-        /// <param name="method">The method to use when closing the connection.</param>
-        /// <param name="cancellationToken">A cancellation token for the asynchronous operation.</param>
-        /// <returns>A <see cref="ValueTask"/> for the asynchronous operation.</returns>
-        protected abstract ValueTask CloseAsyncCore(ConnectionCloseMethod method, CancellationToken cancellationToken);
-
-        /// <summary>
-        /// Disposes of the connection.
-        /// </summary>
-        /// <remarks>
-        /// This is equivalent to calling <see cref="CloseAsync(ConnectionCloseMethod, CancellationToken)"/> with the method <see cref="ConnectionCloseMethod.GracefulShutdown"/>, and calling GetAwaiter().GetResult() on the resulting task.
-        /// To increase likelihood of synchronous completion, call <see cref="CloseAsync(ConnectionCloseMethod, CancellationToken)"/> directly with the method <see cref="ConnectionCloseMethod.Immediate"/>.
-        /// </remarks>
-        public void Dispose()
-        {
-            ValueTask t = CloseAsync(ConnectionCloseMethod.GracefulShutdown, CancellationToken.None);
-
-            if (t.IsCompleted) t.GetAwaiter().GetResult();
-            else t.AsTask().GetAwaiter().GetResult();
-        }
-
-        /// <summary>
-        /// Disposes of the connection.
-        /// </summary>
-        /// <returns>A <see cref="ValueTask"/> for the asynchronous operation.</returns>
-        /// <remarks>This is equivalent to calling <see cref="CloseAsync(ConnectionCloseMethod, CancellationToken)"/> with the method <see cref="ConnectionCloseMethod.GracefulShutdown"/>.</remarks>
-        public ValueTask DisposeAsync()
-        {
-            return CloseAsync(ConnectionCloseMethod.GracefulShutdown, CancellationToken.None);
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionCloseMethod.cs b/src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionCloseMethod.cs
deleted file mode 100644 (file)
index 6b5a079..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Net.Connections
-{
-    /// <summary>
-    /// Methods for closing a connection.
-    /// </summary>
-    public enum ConnectionCloseMethod
-    {
-        /// <summary>
-        /// The connection should be flushed and closed.
-        /// </summary>
-        GracefulShutdown,
-
-        /// <summary>
-        /// The connection should be aborted gracefully, performing any I/O needed to notify the other side of the connection that it has been aborted.
-        /// </summary>
-        Abort,
-
-        /// <summary>
-        /// The connection should be aborted immediately, avoiding any I/O needed to notify the other side of the connection that it has been aborted.
-        /// </summary>
-        Immediate
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionExtensions.cs b/src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionExtensions.cs
deleted file mode 100644 (file)
index 6850247..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Diagnostics.CodeAnalysis;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections
-{
-    /// <summary>
-    /// Extension methods for working with the System.Net.Connections types.
-    /// </summary>
-    public static class ConnectionExtensions
-    {
-        /// <summary>
-        /// Retrieves a Type-based property from an <see cref="IConnectionProperties"/>, if it exists.
-        /// </summary>
-        /// <typeparam name="T">The type of the property to retrieve.</typeparam>
-        /// <param name="properties">The connection properties to retrieve a property from.</param>
-        /// <param name="property">If <paramref name="properties"/> contains a property of type <typeparamref name="T"/>, receives the property. Otherwise, default.</param>
-        /// <returns>If <paramref name="properties"/> contains a property of type <typeparamref name="T"/>, true. Otherwise, false.</returns>
-        public static bool TryGet<T>(this IConnectionProperties properties, [MaybeNullWhen(false)] out T property)
-        {
-            if (properties == null) throw new ArgumentNullException(nameof(properties));
-
-            if (properties.TryGet(typeof(T), out object? obj) && obj is T propertyValue)
-            {
-                property = propertyValue;
-                return true;
-            }
-            else
-            {
-                property = default;
-                return false;
-            }
-        }
-
-        /// <summary>
-        /// Creates a connection-level filter on top of a <see cref="ConnectionFactory"/>.
-        /// </summary>
-        /// <param name="factory">The factory to be filtered.</param>
-        /// <param name="filter">The connection-level filter to apply on top of <paramref name="factory"/>.</param>
-        /// <returns>A new filtered <see cref="ConnectionFactory"/>.</returns>
-        public static ConnectionFactory Filter(this ConnectionFactory factory, Func<Connection, IConnectionProperties?, CancellationToken, ValueTask<Connection>> filter)
-        {
-            if (factory == null) throw new ArgumentNullException(nameof(factory));
-            if (filter == null) throw new ArgumentNullException(nameof(filter));
-            return new ConnectionFilteringFactory(factory, filter);
-        }
-
-        private sealed class ConnectionFilteringFactory : ConnectionFactory
-        {
-            private readonly ConnectionFactory _baseFactory;
-            private readonly Func<Connection, IConnectionProperties?, CancellationToken, ValueTask<Connection>> _filter;
-
-            public ConnectionFilteringFactory(ConnectionFactory baseFactory, Func<Connection, IConnectionProperties?, CancellationToken, ValueTask<Connection>> filter)
-            {
-                _baseFactory = baseFactory;
-                _filter = filter;
-            }
-
-            public override async ValueTask<Connection> ConnectAsync(EndPoint? endPoint, IConnectionProperties? options = null, CancellationToken cancellationToken = default)
-            {
-                Connection con = await _baseFactory.ConnectAsync(endPoint, options, cancellationToken).ConfigureAwait(false);
-                try
-                {
-                    return await _filter(con, options, cancellationToken).ConfigureAwait(false);
-                }
-                catch
-                {
-                    await con.CloseAsync(ConnectionCloseMethod.Abort, cancellationToken).ConfigureAwait(false);
-                    throw;
-                }
-            }
-
-            protected override void Dispose(bool disposing)
-            {
-                if (disposing) _baseFactory.Dispose();
-            }
-
-            protected override ValueTask DisposeAsyncCore()
-            {
-                return _baseFactory.DisposeAsync();
-            }
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionFactory.cs b/src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionFactory.cs
deleted file mode 100644 (file)
index 812f78a..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections
-{
-    /// <summary>
-    /// A factory for opening outgoing connections.
-    /// </summary>
-    public abstract class ConnectionFactory : IAsyncDisposable, IDisposable
-    {
-        /// <summary>
-        /// Opens a new <see cref="Connection"/>.
-        /// </summary>
-        /// <param name="endPoint">The <see cref="EndPoint"/> to connect to, if any.</param>
-        /// <param name="options">Options used to create the connection, if any.</param>
-        /// <param name="cancellationToken">A token used to cancel the asynchronous operation.</param>
-        /// <returns>A <see cref="ValueTask{TResult}"/> for the <see cref="Connection"/>.</returns>
-        public abstract ValueTask<Connection> ConnectAsync(EndPoint? endPoint, IConnectionProperties? options = null, CancellationToken cancellationToken = default);
-
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-        }
-
-        public async ValueTask DisposeAsync()
-        {
-            await DisposeAsyncCore().ConfigureAwait(false);
-            GC.SuppressFinalize(this);
-        }
-
-        /// <summary>
-        /// Disposes the <see cref="ConnectionFactory"/>.
-        /// </summary>
-        /// <param name="disposing">If true, the <see cref="ConnectionFactory"/> is being disposed. If false, the <see cref="ConnectionFactory"/> is being finalized.</param>
-        protected virtual void Dispose(bool disposing)
-        {
-        }
-
-        /// <summary>
-        /// Asynchronously disposes the <see cref="ConnectionFactory"/>.
-        /// </summary>
-        /// <returns>A <see cref="ValueTask"/> representing the asynchronous dispose operation.</returns>
-        protected virtual ValueTask DisposeAsyncCore()
-        {
-            Dispose(true);
-            return default;
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionListener.cs b/src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionListener.cs
deleted file mode 100644 (file)
index e01b92a..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections
-{
-    /// <summary>
-    /// A listener to accept incoming connections.
-    /// </summary>
-    public abstract class ConnectionListener : IAsyncDisposable, IDisposable
-    {
-        /// <summary>
-        /// Properties exposed by this listener.
-        /// </summary>
-        public abstract IConnectionProperties ListenerProperties { get; }
-
-        /// <summary>
-        /// The local endpoint of this connection, if any.
-        /// </summary>
-        public abstract EndPoint? LocalEndPoint { get; }
-
-        /// <summary>
-        /// Accepts an incoming connection.
-        /// </summary>
-        /// <param name="options">Options used to create the connection, if any.</param>
-        /// <param name="cancellationToken">A token used to cancel the asynchronous operation.</param>
-        /// <returns>A <see cref="ValueTask{TResult}"/> for the <see cref="Connection"/>.</returns>
-        public abstract ValueTask<Connection?> AcceptAsync(IConnectionProperties? options = null, CancellationToken cancellationToken = default);
-
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-        }
-
-        public async ValueTask DisposeAsync()
-        {
-            await DisposeAsyncCore().ConfigureAwait(false);
-            GC.SuppressFinalize(this);
-        }
-
-        /// <summary>
-        /// Disposes the <see cref="ConnectionFactory"/>.
-        /// </summary>
-        /// <param name="disposing">If true, the <see cref="ConnectionFactory"/> is being disposed. If false, the <see cref="ConnectionFactory"/> is being finalized.</param>
-        protected virtual void Dispose(bool disposing)
-        {
-        }
-
-        /// <summary>
-        /// Asynchronously disposes the <see cref="ConnectionFactory"/>.
-        /// </summary>
-        /// <returns>A <see cref="ValueTask"/> representing the asynchronous dispose operation.</returns>
-        protected virtual ValueTask DisposeAsyncCore()
-        {
-            Dispose(true);
-            return default;
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionListenerFactory.cs b/src/libraries/System.Net.Connections/src/System/Net/Connections/ConnectionListenerFactory.cs
deleted file mode 100644 (file)
index 7e6339d..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections
-{
-    /// <summary>
-    /// A factory for creating connection listeners, to accept incoming connections.
-    /// </summary>
-    public abstract class ConnectionListenerFactory : IAsyncDisposable, IDisposable
-    {
-        public abstract ValueTask<ConnectionListener> ListenAsync(EndPoint? endPoint, IConnectionProperties? options = null, CancellationToken cancellationToken = default);
-
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-        }
-
-        public async ValueTask DisposeAsync()
-        {
-            await DisposeAsyncCore().ConfigureAwait(false);
-            GC.SuppressFinalize(this);
-        }
-
-        /// <summary>
-        /// Disposes the <see cref="ConnectionFactory"/>.
-        /// </summary>
-        /// <param name="disposing">If true, the <see cref="ConnectionFactory"/> is being disposed. If false, the <see cref="ConnectionFactory"/> is being finalized.</param>
-        protected virtual void Dispose(bool disposing)
-        {
-        }
-
-        /// <summary>
-        /// Asynchronously disposes the <see cref="ConnectionFactory"/>.
-        /// </summary>
-        /// <returns>A <see cref="ValueTask"/> representing the asynchronous dispose operation.</returns>
-        protected virtual ValueTask DisposeAsyncCore()
-        {
-            Dispose(true);
-            return default;
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/Connections/DuplexPipeStream.cs b/src/libraries/System.Net.Connections/src/System/Net/Connections/DuplexPipeStream.cs
deleted file mode 100644 (file)
index 825f4fe..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System;
-using System.Buffers;
-using System.IO;
-using System.IO.Pipelines;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections
-{
-    internal sealed class DuplexPipeStream : Stream
-    {
-        private readonly PipeReader _reader;
-        private readonly PipeWriter _writer;
-
-        public override bool CanRead => true;
-        public override bool CanSeek => false;
-        public override bool CanWrite => true;
-        public override long Length => throw new NotSupportedException();
-        public override long Position { get => throw new NotSupportedException(); set => throw new NotSupportedException(); }
-
-        public DuplexPipeStream(IDuplexPipe pipe)
-        {
-            _reader = pipe.Input;
-            _writer = pipe.Output;
-        }
-
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing)
-            {
-                _reader.Complete();
-                _writer.Complete();
-            }
-            base.Dispose(disposing);
-        }
-
-        public override async ValueTask DisposeAsync()
-        {
-            await _reader.CompleteAsync().ConfigureAwait(false);
-            await _writer.CompleteAsync().ConfigureAwait(false);
-        }
-
-        public override void Flush()
-        {
-            FlushAsync().GetAwaiter().GetResult();
-        }
-
-        public override async Task FlushAsync(CancellationToken cancellationToken)
-        {
-            FlushResult r = await _writer.FlushAsync(cancellationToken).ConfigureAwait(false);
-            if (r.IsCanceled) throw new OperationCanceledException(cancellationToken);
-        }
-
-        public override int Read(byte[] buffer, int offset, int count)
-        {
-            ValidateBufferArguments(buffer, offset, count);
-
-            ValueTask<int> t = ReadAsync(buffer.AsMemory(offset, count));
-            return
-                t.IsCompleted ? t.GetAwaiter().GetResult() :
-                t.AsTask().GetAwaiter().GetResult();
-        }
-
-        public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
-        {
-            ValidateBufferArguments(buffer, offset, count);
-
-            return ReadAsync(buffer.AsMemory(offset, count), cancellationToken).AsTask();
-        }
-
-        public override async ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default)
-        {
-            ReadResult result = await _reader.ReadAsync(cancellationToken).ConfigureAwait(false);
-
-            if (result.IsCanceled)
-            {
-                throw new OperationCanceledException();
-            }
-
-            ReadOnlySequence<byte> sequence = result.Buffer;
-            long bufferLength = sequence.Length;
-            SequencePosition consumed = sequence.Start;
-
-            try
-            {
-                if (bufferLength != 0)
-                {
-                    int actual = (int)Math.Min(bufferLength, buffer.Length);
-
-                    ReadOnlySequence<byte> slice = actual == bufferLength ? sequence : sequence.Slice(0, actual);
-                    consumed = slice.End;
-                    slice.CopyTo(buffer.Span);
-
-                    return actual;
-                }
-
-                if (result.IsCompleted)
-                {
-                    return 0;
-                }
-            }
-            finally
-            {
-                _reader.AdvanceTo(consumed);
-            }
-
-            // This is a buggy PipeReader implementation that returns 0 byte reads even though the PipeReader
-            // isn't completed or canceled.
-            throw new InvalidOperationException(SR.net_connections_zero_byte_pipe_read);
-        }
-
-        public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
-        {
-            return TaskToApm.Begin(ReadAsync(buffer, offset, count), callback, state);
-        }
-
-        public override int EndRead(IAsyncResult asyncResult)
-        {
-            return TaskToApm.End<int>(asyncResult);
-        }
-
-        public override long Seek(long offset, SeekOrigin origin)
-        {
-            throw new NotSupportedException();
-        }
-
-        public override void SetLength(long value)
-        {
-            throw new NotSupportedException();
-        }
-
-        public override void Write(byte[] buffer, int offset, int count)
-        {
-            WriteAsync(buffer, offset, count, CancellationToken.None).GetAwaiter().GetResult();
-        }
-
-        public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
-        {
-            ValidateBufferArguments(buffer, offset, count);
-
-            return WriteAsync(buffer.AsMemory(offset, count), cancellationToken).AsTask();
-        }
-
-        public override async ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
-        {
-            FlushResult r = await _writer.WriteAsync(buffer, cancellationToken).ConfigureAwait(false);
-            if (r.IsCanceled) throw new OperationCanceledException(cancellationToken);
-        }
-
-        public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
-        {
-            return TaskToApm.Begin(WriteAsync(buffer, offset, count), callback, state);
-        }
-
-        public override void EndWrite(IAsyncResult asyncResult)
-        {
-            TaskToApm.End(asyncResult);
-        }
-
-        public override Task CopyToAsync(Stream destination, int bufferSize, CancellationToken cancellationToken)
-        {
-            ValidateCopyToArguments(destination, bufferSize);
-
-            return _reader.CopyToAsync(destination, cancellationToken);
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/Connections/DuplexStreamPipe.cs b/src/libraries/System.Net.Connections/src/System/Net/Connections/DuplexStreamPipe.cs
deleted file mode 100644 (file)
index 7b620c2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.IO;
-using System.IO.Pipelines;
-
-namespace System.Net.Connections
-{
-    internal sealed class DuplexStreamPipe : IDuplexPipe
-    {
-        private static readonly StreamPipeReaderOptions s_readerOpts = new StreamPipeReaderOptions(leaveOpen: true);
-        private static readonly StreamPipeWriterOptions s_writerOpts = new StreamPipeWriterOptions(leaveOpen: true);
-
-        public DuplexStreamPipe(Stream stream)
-        {
-            Input = PipeReader.Create(stream, s_readerOpts);
-            Output = PipeWriter.Create(stream, s_writerOpts);
-        }
-
-        public PipeReader Input { get; }
-
-        public PipeWriter Output { get; }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/Connections/IConnectionProperties.cs b/src/libraries/System.Net.Connections/src/System/Net/Connections/IConnectionProperties.cs
deleted file mode 100644 (file)
index ce89dd9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.Net.Connections
-{
-    /// <summary>
-    /// A container for connection properties.
-    /// </summary>
-    public interface IConnectionProperties
-    {
-        /// <summary>
-        /// Retrieves a connection property, if it exists.
-        /// </summary>
-        /// <param name="propertyKey">The key of the property to retrieve.</param>
-        /// <param name="property">If the property was found, retrieves the property. Otherwise, null.</param>
-        /// <returns>If the property was found, true. Otherwise, false.</returns>
-        bool TryGet(Type propertyKey, [NotNullWhen(true)] out object? property);
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/Connections/Sockets/SocketConnection.cs b/src/libraries/System.Net.Connections/src/System/Net/Connections/Sockets/SocketConnection.cs
deleted file mode 100644 (file)
index 2eb3e6b..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Diagnostics.CodeAnalysis;
-using System.IO;
-using System.IO.Pipelines;
-using System.Net.Sockets;
-using System.Runtime.ExceptionServices;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections
-{
-    internal sealed class SocketConnection : Connection, IConnectionProperties
-    {
-        private readonly Socket _socket;
-        private Stream? _stream;
-
-        public override EndPoint? RemoteEndPoint => _socket.RemoteEndPoint;
-        public override EndPoint? LocalEndPoint => _socket.LocalEndPoint;
-        public override IConnectionProperties ConnectionProperties => this;
-
-        public SocketConnection(Socket socket)
-        {
-            _socket = socket;
-        }
-
-        protected override ValueTask CloseAsyncCore(ConnectionCloseMethod method, CancellationToken cancellationToken)
-        {
-            if (cancellationToken.IsCancellationRequested)
-            {
-                return ValueTask.FromCanceled(cancellationToken);
-            }
-
-            try
-            {
-                if (method != ConnectionCloseMethod.GracefulShutdown)
-                {
-                    // Dispose must be called first in order to cause a connection reset,
-                    // as NetworkStream.Dispose() will call Shutdown(Both).
-                    _socket.Dispose();
-                }
-
-                // Since CreatePipe() calls CreateStream(), so _stream should be present even in the pipe case:
-                _stream?.Dispose();
-            }
-            catch (SocketException socketException)
-            {
-                return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(NetworkErrorHelper.MapSocketException(socketException)));
-            }
-            catch (Exception ex)
-            {
-                return ValueTask.FromException(ex);
-            }
-
-            return default;
-        }
-
-        bool IConnectionProperties.TryGet(Type propertyKey, [NotNullWhen(true)] out object? property)
-        {
-            if (propertyKey == typeof(Socket))
-            {
-                property = _socket;
-                return true;
-            }
-
-            property = null;
-            return false;
-        }
-
-        protected override Stream CreateStream() => _stream ??= new NetworkStream(_socket, true);
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/Connections/Sockets/SocketsConnectionFactory.cs b/src/libraries/System.Net.Connections/src/System/Net/Connections/Sockets/SocketsConnectionFactory.cs
deleted file mode 100644 (file)
index 732ad94..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.IO;
-using System.IO.Pipelines;
-using System.Net.Sockets;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections
-{
-    /// <summary>
-    /// A <see cref="ConnectionFactory"/> to establish socket-based connections.
-    /// </summary>
-    /// <remarks>
-    /// When constructed with <see cref="ProtocolType.Tcp"/>, this factory will create connections with <see cref="Socket.NoDelay"/> enabled.
-    /// In case of IPv6 sockets <see cref="Socket.DualMode"/> is also enabled.
-    /// </remarks>
-    public class SocketsConnectionFactory : ConnectionFactory
-    {
-        private readonly AddressFamily _addressFamily;
-        private readonly SocketType _socketType;
-        private readonly ProtocolType _protocolType;
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="SocketsConnectionFactory"/> class.
-        /// </summary>
-        /// <param name="addressFamily">The <see cref="AddressFamily"/> to forward to the socket.</param>
-        /// <param name="socketType">The <see cref="SocketType"/> to forward to the socket.</param>
-        /// <param name="protocolType">The <see cref="ProtocolType"/> to forward to the socket.</param>
-        public SocketsConnectionFactory(
-            AddressFamily addressFamily,
-            SocketType socketType,
-            ProtocolType protocolType)
-        {
-            _addressFamily = addressFamily;
-            _socketType = socketType;
-            _protocolType = protocolType;
-        }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="SocketsConnectionFactory"/> class
-        /// that will forward <see cref="AddressFamily.InterNetworkV6"/> to the Socket constructor.
-        /// </summary>
-        /// <param name="socketType">The <see cref="SocketType"/> to forward to the socket.</param>
-        /// <param name="protocolType">The <see cref="ProtocolType"/> to forward to the socket.</param>
-        /// <remarks>The created socket will be an IPv6 socket with <see cref="Socket.DualMode"/> enabled.</remarks>
-        public SocketsConnectionFactory(SocketType socketType, ProtocolType protocolType)
-            : this(AddressFamily.InterNetworkV6, socketType, protocolType)
-        {
-        }
-
-        /// <inheritdoc />
-        /// <exception cref="ArgumentNullException">When <paramref name="endPoint"/> is <see langword="null"/>.</exception>
-        public override async ValueTask<Connection> ConnectAsync(
-            EndPoint? endPoint,
-            IConnectionProperties? options = null,
-            CancellationToken cancellationToken = default)
-        {
-            if (endPoint == null) throw new ArgumentNullException(nameof(endPoint));
-            cancellationToken.ThrowIfCancellationRequested();
-
-            Socket socket = CreateSocket(_addressFamily, _socketType, _protocolType, endPoint, options);
-
-            try
-            {
-                await socket.ConnectAsync(endPoint, cancellationToken).ConfigureAwait(false);
-                return new SocketConnection(socket);
-            }
-            catch (SocketException socketException)
-            {
-                socket.Dispose();
-                throw NetworkErrorHelper.MapSocketException(socketException);
-            }
-            catch
-            {
-                socket.Dispose();
-                throw;
-            }
-        }
-
-        /// <summary>
-        /// Creates the socket that shall be used with the connection.
-        /// </summary>
-        /// <param name="addressFamily">The <see cref="AddressFamily"/> to forward to the socket.</param>
-        /// <param name="socketType">The <see cref="SocketType"/> to forward to the socket.</param>
-        /// <param name="protocolType">The <see cref="ProtocolType"/> to forward to the socket.</param>
-        /// <param name="endPoint">The <see cref="EndPoint"/> this socket will be connected to.</param>
-        /// <param name="options">Properties, if any, that might change how the socket is initialized.</param>
-        /// <returns>A new unconnected <see cref="Socket"/>.</returns>
-        /// <remarks>
-        /// In case of TCP sockets, the default implementation of this method will create a socket with <see cref="Socket.NoDelay"/> enabled.
-        /// In case of IPv6 sockets <see cref="Socket.DualMode"/> is also be enabled.
-        /// </remarks>
-        protected virtual Socket CreateSocket(
-            AddressFamily addressFamily,
-            SocketType socketType,
-            ProtocolType protocolType,
-            EndPoint? endPoint,
-            IConnectionProperties? options)
-        {
-            Socket socket = new Socket(addressFamily, socketType, protocolType);
-
-            if (protocolType == ProtocolType.Tcp)
-            {
-                socket.NoDelay = true;
-            }
-
-            if (addressFamily == AddressFamily.InterNetworkV6)
-            {
-                socket.DualMode = true;
-            }
-
-            return socket;
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/NetworkError.cs b/src/libraries/System.Net.Connections/src/System/Net/NetworkError.cs
deleted file mode 100644 (file)
index 5d1099a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Net
-{
-    /// <summary>Defines a set of error codes for use with <see cref='System.Net.NetworkException'/>.</summary>
-    public enum NetworkError : int
-    {
-        /// <summary>A network error has occurred.</summary>
-        /// <remarks>
-        /// This value indicates a non-generic, implementation-specific error.
-        /// Details could be obtained from <see cref="NetworkException"/>'s inner exception.
-        /// </remarks>
-        Other = 0,
-
-        /// <summary>The requested EndPoint is already in use.</summary>
-        EndPointInUse,
-
-        /// <summary>No such host is known.</summary>
-        HostNotFound,
-
-        /// <summary>The connection attempt has timed out.</summary>
-        TimedOut,
-
-        /// <summary>No connection could be made because the remote host actively refused it.</summary>
-        ConnectionRefused,
-
-        /// <summary>The operation was aborted by the user.</summary>
-        OperationAborted,
-
-        /// <summary>The connection was aborted by the local host.</summary>
-        ConnectionAborted,
-
-        /// <summary>The connection was forcibly closed by the remote host.</summary>
-        ConnectionReset,
-    }
-}
diff --git a/src/libraries/System.Net.Connections/src/System/Net/NetworkException.cs b/src/libraries/System.Net.Connections/src/System/Net/NetworkException.cs
deleted file mode 100644 (file)
index ef99bd8..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.IO;
-using System.Runtime.Serialization;
-
-namespace System.Net
-{
-    /// <summary>Provides socket exceptions to the application.</summary>
-    [Serializable]
-    public class NetworkException : IOException
-    {
-        /// <summary>Creates a new instance of the <see cref='System.Net.NetworkException'/> class with the specified error code.</summary>
-        public NetworkException(NetworkError error, Exception? innerException = null)
-            : this(GetExceptionMessage(error), error, innerException) {}
-
-        /// <summary>Creates a new instance of the <see cref='System.Net.NetworkException'/> class with the specified error code and message.</summary>
-        public NetworkException(string message, NetworkError error, Exception? innerException = null)
-            : base(message, innerException)
-        {
-            NetworkError = error;
-        }
-
-        /// <summary>Creates a new instance of the <see cref='System.Net.NetworkException'/> from serialized data.</summary>
-        protected NetworkException(SerializationInfo serializationInfo, StreamingContext streamingContext)
-            : base(serializationInfo, streamingContext)
-        {
-            NetworkError = (NetworkError)serializationInfo.GetInt32("NetworkError");
-        }
-
-        /// <summary>Populates the serialization data for this object.</summary>
-        public override void GetObjectData(SerializationInfo serializationInfo, StreamingContext streamingContext)
-        {
-            base.GetObjectData(serializationInfo, streamingContext);
-            serializationInfo.AddValue("NetworkError", (int)NetworkError);
-        }
-
-        /// <summary>Returns the specific kind of error.</summary>
-        public NetworkError NetworkError { get; }
-
-        // TODO: Better exception messages
-        private static string GetExceptionMessage(NetworkError error) => $"A network error occurred: {error}";
-    }
-}
diff --git a/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/ConnectionBaseTest.cs b/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/ConnectionBaseTest.cs
deleted file mode 100644 (file)
index 66cc4a2..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Threading.Tasks;
-using Xunit;
-
-namespace System.Net.Connections.Tests
-{
-    public class ConnectionBaseTest
-    {
-        [Fact]
-        public void Dispose_CallsClose_Success()
-        {
-            ConnectionCloseMethod? method = null;
-
-            var con = new MockConnection();
-            con.OnCloseAsyncCore = (m, t) =>
-            {
-                method = m;
-                return default(ValueTask);
-            };
-
-            con.Dispose();
-
-            Assert.Equal(ConnectionCloseMethod.GracefulShutdown, method);
-        }
-
-        [Fact]
-        public async Task DisposeAsync_CallsClose_Success()
-        {
-            ConnectionCloseMethod? method = null;
-
-            var con = new MockConnection();
-            con.OnCloseAsyncCore = (m, t) =>
-            {
-                method = m;
-                return default(ValueTask);
-            };
-
-            await con.DisposeAsync();
-
-            Assert.Equal(ConnectionCloseMethod.GracefulShutdown, method);
-        }
-
-        [Fact]
-        public void Dispose_CalledOnce_Success()
-        {
-            int callCount = 0;
-
-            var con = new MockConnection();
-            con.OnCloseAsyncCore = delegate
-            {
-                ++callCount;
-                return default(ValueTask);
-            };
-
-            con.Dispose();
-            con.Dispose();
-
-            Assert.Equal(1, callCount);
-        }
-
-        [Fact]
-        public async Task DisposeAsync_CalledOnce_Success()
-        {
-            int callCount = 0;
-
-            var con = new MockConnection();
-            con.OnCloseAsyncCore = delegate
-            {
-                ++callCount;
-                return default(ValueTask);
-            };
-
-            await con.DisposeAsync();
-            await con.DisposeAsync();
-
-            Assert.Equal(1, callCount);
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/ConnectionTest.cs b/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/ConnectionTest.cs
deleted file mode 100644 (file)
index ad16e45..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Buffers;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.IO;
-using System.IO.Pipelines;
-using System.Linq;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-using Xunit;
-
-namespace System.Net.Connections.Tests
-{
-    public class ConnectionTest
-    {
-        [Fact]
-        public void CreateStream_CalledOnce_Success()
-        {
-            int callCount = 0;
-
-            var con = new MockConnection();
-            con.OnCreateStream = () =>
-            {
-                ++callCount;
-                return new MemoryStream();
-            };
-
-            _ = con.Stream;
-            _ = con.Stream;
-
-            Assert.Equal(1, callCount);
-        }
-
-        [Fact]
-        public void CreatePipe_CalledOnce_Success()
-        {
-            int callCount = 0;
-
-            var con = new MockConnection();
-            con.OnCreatePipe = () =>
-            {
-                ++callCount;
-                return new MockPipe();
-            };
-
-            _ = con.Pipe;
-            _ = con.Pipe;
-
-            Assert.Equal(1, callCount);
-        }
-
-        [Fact]
-        public void AccessStream_AccessPipe_Fail()
-        {
-            var con = new MockConnection();
-            con.OnCreateStream = () => new MemoryStream();
-
-            _ = con.Stream;
-            Assert.Throws<InvalidOperationException>(() => _ = con.Pipe);
-        }
-
-        [Fact]
-        public void AccessPipe_AccessStream_Fail()
-        {
-            var con = new MockConnection();
-            con.OnCreatePipe = () => new MockPipe();
-
-            _ = con.Pipe;
-            Assert.Throws<InvalidOperationException>(() => _ = con.Stream);
-        }
-
-        [Fact]
-        public void AccessStream_NoOverloads_Fail()
-        {
-            var con = new ConnectionWithoutStreamOrPipe();
-            Assert.Throws<InvalidOperationException>(() => _ = con.Stream);
-        }
-
-        [Fact]
-        public void AccessPipe_NoOverloads_Fail()
-        {
-            var con = new ConnectionWithoutStreamOrPipe();
-            Assert.Throws<InvalidOperationException>(() => _ = con.Pipe);
-        }
-
-        [Fact]
-        public async Task WrappedStream_Success()
-        {
-            var bytesA = Encoding.ASCII.GetBytes("foo");
-            var bytesB = Encoding.ASCII.GetBytes("bar");
-
-            var stream = new MemoryStream();
-            stream.Write(bytesA);
-            stream.Position = 0;
-
-            var con = new MockConnection();
-            con.OnCreateStream = () => stream;
-
-            IDuplexPipe pipe = con.Pipe;
-
-            ReadResult res = await pipe.Input.ReadAsync();
-            Assert.Equal(bytesA, res.Buffer.ToArray());
-
-            await pipe.Output.WriteAsync(bytesB);
-            Assert.Equal(bytesA.Concat(bytesB).ToArray(), stream.ToArray());
-        }
-
-        [Fact]
-        public async Task WrappedPipe_Success()
-        {
-            var bytesA = Encoding.ASCII.GetBytes("foo");
-            var bytesB = Encoding.ASCII.GetBytes("bar");
-
-            var stream = new MemoryStream();
-            stream.Write(bytesA);
-            stream.Position = 0;
-
-            var pipe = new MockPipe
-            {
-                Input = PipeReader.Create(stream),
-                Output = PipeWriter.Create(stream)
-            };
-
-            var con = new MockConnection();
-            con.OnCreatePipe = () => pipe;
-
-            Stream s = con.Stream;
-
-            var readBuffer = new byte[4];
-            int len = await s.ReadAsync(readBuffer);
-            Assert.Equal(3, len);
-            Assert.Equal(bytesA, readBuffer.AsSpan(0, len).ToArray());
-
-            await s.WriteAsync(bytesB);
-            Assert.Equal(bytesA.Concat(bytesB).ToArray(), stream.ToArray());
-        }
-
-        [Theory]
-        [InlineData(ConnectionCloseMethod.GracefulShutdown, true)]
-        [InlineData(ConnectionCloseMethod.Abort, false)]
-        [InlineData(ConnectionCloseMethod.Immediate, false)]
-        public async Task FromStream_CloseMethod_Flushed(ConnectionCloseMethod method, bool shouldFlush)
-        {
-            bool streamFlushed = false;
-
-            var stream = new MockStream
-            {
-                OnFlushAsync = _ => { streamFlushed = true; return Task.CompletedTask; }
-            };
-
-            var con = Connection.FromStream(stream, leaveOpen: true);
-
-            await con.CloseAsync(method);
-            Assert.Equal(shouldFlush, streamFlushed);
-        }
-
-        [Theory]
-        [InlineData(ConnectionCloseMethod.GracefulShutdown, true)]
-        [InlineData(ConnectionCloseMethod.Abort, false)]
-        [InlineData(ConnectionCloseMethod.Immediate, false)]
-        public async Task FromPipe_CloseMethod_Flushed(ConnectionCloseMethod method, bool shouldFlush)
-        {
-            bool pipeFlushed = false;
-
-            var pipe = new MockPipe
-            {
-                Input = new MockPipeReader()
-                {
-                    OnCompleteAsync = _ => default
-                },
-                Output = new MockPipeWriter()
-                {
-                    OnFlushAsync = _ => { pipeFlushed = true; return default; },
-                    OnCompleteAsync = _ => default
-                }
-            };
-
-            var con = Connection.FromPipe(pipe);
-
-            await con.CloseAsync(method, new CancellationTokenSource().Token);
-            Assert.Equal(shouldFlush, pipeFlushed);
-        }
-
-        [Theory]
-        [InlineData(true, false)]
-        [InlineData(false, true)]
-        public async Task FromStream_LeaveOpen_StreamDisposed(bool leaveOpen, bool shouldDispose)
-        {
-            bool streamDisposed = false;
-
-            var stream = new MockStream();
-            stream.OnDisposeAsync = delegate { streamDisposed = true; return default; };
-
-            var con = Connection.FromStream(stream, leaveOpen);
-
-            await con.CloseAsync(ConnectionCloseMethod.Immediate);
-            Assert.Equal(shouldDispose, streamDisposed);
-        }
-
-        [Theory]
-        [InlineData(true, false)]
-        [InlineData(false, true)]
-        public async Task FromPipe_LeaveOpen_PipeDisposed(bool leaveOpen, bool shouldDispose)
-        {
-            bool pipeDisposed = false;
-
-            var pipe = new MockPipe
-            {
-                OnDisposeAsync = () => { pipeDisposed = true; return default; },
-                Input = new MockPipeReader()
-                {
-                    OnCompleteAsync = _ => default
-                },
-                Output = new MockPipeWriter()
-                {
-                    OnFlushAsync = _ => default,
-                    OnCompleteAsync = _ => default
-                }
-            };
-
-            var con = Connection.FromPipe(pipe, leaveOpen);
-
-            await con.CloseAsync(ConnectionCloseMethod.Immediate);
-            Assert.Equal(shouldDispose, pipeDisposed);
-        }
-
-        [Fact]
-        public void FromStream_PropertiesInitialized()
-        {
-            var properties = new DummyConnectionProperties();
-            var localEndPoint = new IPEndPoint(IPAddress.Any, 1);
-            var remoteEndPoint = new IPEndPoint(IPAddress.Any, 2);
-
-            Connection c = Connection.FromStream(new MockStream(), leaveOpen: false, properties, localEndPoint, remoteEndPoint);
-            Assert.Same(properties, c.ConnectionProperties);
-            Assert.Same(localEndPoint, c.LocalEndPoint);
-            Assert.Same(remoteEndPoint, c.RemoteEndPoint);
-        }
-
-        [Fact]
-        public void FromPipe_PropertiesInitialized()
-        {
-            var properties = new DummyConnectionProperties();
-            var localEndPoint = new IPEndPoint(IPAddress.Any, 1);
-            var remoteEndPoint = new IPEndPoint(IPAddress.Any, 2);
-
-            Connection c = Connection.FromPipe(new MockPipe(), leaveOpen: false, properties, localEndPoint, remoteEndPoint);
-            Assert.Same(properties, c.ConnectionProperties);
-            Assert.Same(localEndPoint, c.LocalEndPoint);
-            Assert.Same(remoteEndPoint, c.RemoteEndPoint);
-        }
-
-        private sealed class DummyConnectionProperties : IConnectionProperties
-        {
-            public bool TryGet(Type propertyKey, [NotNullWhen(true)] out object property)
-            {
-                throw new NotImplementedException();
-            }
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/ConnectionWithoutStreamOrPipe.cs b/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/ConnectionWithoutStreamOrPipe.cs
deleted file mode 100644 (file)
index 16e5238..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections.Tests
-{
-    internal class ConnectionWithoutStreamOrPipe : Connection
-    {
-        public override IConnectionProperties ConnectionProperties => throw new NotImplementedException();
-
-        public override EndPoint LocalEndPoint => throw new NotImplementedException();
-
-        public override EndPoint RemoteEndPoint => throw new NotImplementedException();
-
-        protected override ValueTask CloseAsyncCore(ConnectionCloseMethod method, CancellationToken cancellationToken)
-        {
-            throw new NotImplementedException();
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockConnection.cs b/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockConnection.cs
deleted file mode 100644 (file)
index f1acf75..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.IO;
-using System.IO.Pipelines;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections.Tests
-{
-    internal class MockConnection : Connection
-    {
-        public Func<IConnectionProperties> OnConnectionProperties { get; set; }
-        public Func<EndPoint> OnLocalEndPoint { get; set; }
-        public Func<EndPoint> OnRemoteEndPoint { get; set; }
-        public Func<ConnectionCloseMethod, CancellationToken, ValueTask> OnCloseAsyncCore { get; set; }
-        public Func<IDuplexPipe> OnCreatePipe { get; set; }
-        public Func<Stream> OnCreateStream { get; set; }
-
-        public override IConnectionProperties ConnectionProperties => OnConnectionProperties();
-
-        public override EndPoint LocalEndPoint => OnLocalEndPoint();
-
-        public override EndPoint RemoteEndPoint => OnRemoteEndPoint();
-
-        protected override ValueTask CloseAsyncCore(ConnectionCloseMethod method, CancellationToken cancellationToken) =>
-            OnCloseAsyncCore(method, cancellationToken);
-
-        protected override IDuplexPipe CreatePipe() => OnCreatePipe != null ? OnCreatePipe() : base.CreatePipe();
-
-        protected override Stream CreateStream() => OnCreateStream != null ? OnCreateStream() : base.CreateStream();
-    }
-}
diff --git a/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockPipe.cs b/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockPipe.cs
deleted file mode 100644 (file)
index 6abbb9a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.IO.Pipelines;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections.Tests
-{
-    internal class MockPipe : IDuplexPipe, IAsyncDisposable
-    {
-        public Func<ValueTask> OnDisposeAsync { get; set; }
-        public PipeReader Input { get; set; }
-
-        public PipeWriter Output { get; set; }
-
-        public ValueTask DisposeAsync()
-        {
-            return OnDisposeAsync?.Invoke() ?? default;
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockPipeReader.cs b/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockPipeReader.cs
deleted file mode 100644 (file)
index 2413bf1..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.IO.Pipelines;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections.Tests
-{
-    internal class MockPipeReader : PipeReader
-    {
-        public Action<SequencePosition, SequencePosition> OnAdvanceTo { get; set; }
-        public Action OnCancelPendingRead { get; set; }
-        public Action<Exception> OnComplete { get; set; }
-        public Func<Exception,ValueTask> OnCompleteAsync { get; set; }
-        public Func<CancellationToken, ValueTask<ReadResult>> OnReadAsync { get; set; }
-        public Func<ReadResult?> OnTryRead { get; set; }
-
-        public override void AdvanceTo(SequencePosition consumed)
-            => OnAdvanceTo(consumed, consumed);
-
-        public override void AdvanceTo(SequencePosition consumed, SequencePosition examined)
-            => OnAdvanceTo(consumed, examined);
-
-        public override void CancelPendingRead()
-            => OnCancelPendingRead();
-
-        public override void Complete(Exception exception = null)
-            => OnComplete(exception);
-
-        public override ValueTask<ReadResult> ReadAsync(CancellationToken cancellationToken = default)
-            => OnReadAsync(cancellationToken);
-
-        public override bool TryRead(out ReadResult result)
-        {
-            ReadResult? r = OnTryRead();
-            result = r.GetValueOrDefault();
-            return r.HasValue;
-        }
-
-        public override ValueTask CompleteAsync(Exception exception = null)
-            => OnCompleteAsync(exception);
-    }
-}
diff --git a/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockPipeWriter.cs b/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockPipeWriter.cs
deleted file mode 100644 (file)
index 7c35e19..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.IO.Pipelines;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections.Tests
-{
-    internal class MockPipeWriter : PipeWriter
-    {
-        public Action<int> OnAdvance { get; set; }
-        public Action OnCancelPendingFlush { get; set; }
-        public Action<Exception> OnComplete { get; set; }
-        public Func<Exception,ValueTask> OnCompleteAsync { get; set; }
-        public Func<CancellationToken,ValueTask<FlushResult>> OnFlushAsync { get; set; }
-        public Func<int, Memory<byte>> OnGetMemory { get; set; }
-
-        public override void Advance(int bytes)
-            => OnAdvance(bytes);
-
-        public override void CancelPendingFlush()
-            => OnCancelPendingFlush();
-
-        public override void Complete(Exception exception = null)
-            => OnComplete(exception);
-
-        public override ValueTask CompleteAsync(Exception exception = null)
-            => OnCompleteAsync(exception);
-
-        public override ValueTask<FlushResult> FlushAsync(CancellationToken cancellationToken = default)
-            => OnFlushAsync(cancellationToken);
-
-        public override Memory<byte> GetMemory(int sizeHint = 0)
-            => OnGetMemory(sizeHint);
-
-        public override Span<byte> GetSpan(int sizeHint = 0)
-            => GetMemory(sizeHint).Span;
-    }
-}
diff --git a/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockStream.cs b/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/MockStream.cs
deleted file mode 100644 (file)
index 50dbc31..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.IO;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Connections.Tests
-{
-    internal class MockStream : Stream
-    {
-        public Func<Memory<byte>, CancellationToken, ValueTask<int>> OnReadAsync { get; set; }
-        public Func<ReadOnlyMemory<byte>, CancellationToken, ValueTask> OnWriteAsync { get; set; }
-        public Func<CancellationToken, Task> OnFlushAsync { get; set; }
-        public Func<ValueTask> OnDisposeAsync { get; set; }
-
-        public override bool CanRead => true;
-
-        public override bool CanSeek => false;
-
-        public override bool CanWrite => true;
-
-        public override long Length => throw new NotImplementedException();
-
-        public override long Position { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
-
-        protected override void Dispose(bool disposing)
-        {
-            if (disposing) DisposeAsync().AsTask().GetAwaiter().GetResult();
-        }
-
-        public override ValueTask DisposeAsync()
-        {
-            return OnDisposeAsync();
-        }
-
-        public override void Flush()
-        {
-            FlushAsync().GetAwaiter().GetResult();
-        }
-
-        public override Task FlushAsync(CancellationToken cancellationToken)
-        {
-            return OnFlushAsync(cancellationToken);
-        }
-
-        public override int Read(byte[] buffer, int offset, int count)
-        {
-            return ReadAsync(buffer, offset, count).GetAwaiter().GetResult();
-        }
-
-        public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
-        {
-            return ReadAsync(buffer.AsMemory(offset, count), cancellationToken).AsTask();
-        }
-
-        public override ValueTask<int> ReadAsync(Memory<byte> buffer, CancellationToken cancellationToken = default)
-        {
-            return OnReadAsync(buffer, cancellationToken);
-        }
-
-        public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
-        {
-            return TaskToApm.Begin(ReadAsync(buffer, offset, count), callback, state);
-        }
-
-        public override int EndRead(IAsyncResult asyncResult)
-        {
-            return TaskToApm.End<int>(asyncResult);
-        }
-
-        public override long Seek(long offset, SeekOrigin origin)
-        {
-            throw new NotImplementedException();
-        }
-
-        public override void SetLength(long value)
-        {
-            throw new NotImplementedException();
-        }
-
-        public override void Write(byte[] buffer, int offset, int count)
-        {
-            WriteAsync(buffer, offset, count).GetAwaiter().GetResult();
-        }
-
-        public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
-        {
-            return WriteAsync(buffer.AsMemory(offset, count), cancellationToken).AsTask();
-        }
-
-        public override ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
-        {
-            return OnWriteAsync(buffer, cancellationToken);
-        }
-
-        public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
-        {
-            return TaskToApm.Begin(WriteAsync(buffer, offset, count), callback, state);
-        }
-
-        public override void EndWrite(IAsyncResult asyncResult)
-        {
-            TaskToApm.End(asyncResult);
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/Sockets/SocketsConnectionFactoryTests.cs b/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/Sockets/SocketsConnectionFactoryTests.cs
deleted file mode 100644 (file)
index 683f1b9..0000000
+++ /dev/null
@@ -1,400 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Buffers;
-using System.Collections.Concurrent;
-using System.IO;
-using System.IO.Pipelines;
-using System.Net.Connections;
-using System.Net.Sockets;
-using System.Net.Sockets.Tests;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-using Xunit;
-
-namespace System.Net.Connections.Tests
-{
-    [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoRuntime))]
-    public class SocketsConnectionFactoryTests
-    {
-        public static TheoryData<EndPoint, SocketType, ProtocolType> GetConnectData()
-        {
-            var result = new TheoryData<EndPoint, SocketType, ProtocolType>()
-            {
-                { new IPEndPoint(IPAddress.Loopback, 0), SocketType.Stream, ProtocolType.Tcp },
-                { new IPEndPoint(IPAddress.IPv6Loopback, 0), SocketType.Stream, ProtocolType.Tcp },
-            };
-
-            if (Socket.OSSupportsUnixDomainSockets)
-            {
-                result.Add(new UnixDomainSocketEndPoint("/replaced/in/test"), SocketType.Stream, ProtocolType.Unspecified);
-            }
-
-            return result;
-        }
-
-        // to avoid random names in TheoryData, we replace the path in test code:
-        private static EndPoint RecreateUdsEndpoint(EndPoint endPoint)
-        {
-            if (endPoint is UnixDomainSocketEndPoint)
-            {
-                endPoint = new UnixDomainSocketEndPoint($"{Path.GetTempPath()}/{Guid.NewGuid()}");
-            }
-            return endPoint;
-        }
-
-        private static Socket ValidateSocket(Connection connection, SocketType? socketType = null, ProtocolType? protocolType = null, AddressFamily? addressFamily = null)
-        {
-            Assert.True(connection.ConnectionProperties.TryGet(out Socket socket));
-            Assert.True(socket.Connected);
-            if (addressFamily != null) Assert.Equal(addressFamily, socket.AddressFamily);
-            if (socketType != null) Assert.Equal(socketType, socket.SocketType);
-            if (protocolType != null) Assert.Equal(protocolType, socket.ProtocolType);
-            return socket;
-        }
-
-        [Theory]
-        [MemberData(nameof(GetConnectData))]
-        public async Task Constructor3_ConnectAsync_Success_PropagatesConstructorArgumentsToSocket(EndPoint endPoint, SocketType socketType, ProtocolType protocolType)
-        {
-            endPoint = RecreateUdsEndpoint(endPoint);
-            using var server = SocketTestServer.SocketTestServerFactory(SocketImplementationType.Async, endPoint, protocolType);
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(endPoint.AddressFamily, socketType, protocolType);
-            using Connection connection = await factory.ConnectAsync(server.EndPoint);
-
-            ValidateSocket(connection, socketType, protocolType, endPoint.AddressFamily);
-        }
-
-        [Fact]
-        public async Task Constructor2_ConnectAsync_Success_CreatesIPv6DualModeSocket()
-        {
-            using var server = SocketTestServer.SocketTestServerFactory(SocketImplementationType.Async, IPAddress.IPv6Loopback);
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(SocketType.Stream, ProtocolType.Tcp);
-            using Connection connection = await factory.ConnectAsync(server.EndPoint);
-
-            Socket socket = ValidateSocket(connection, SocketType.Stream, ProtocolType.Tcp, AddressFamily.InterNetworkV6);
-            Assert.True(socket.DualMode);
-        }
-
-        [Fact]
-        public async Task ConnectAsync_Success_SocketNoDelayIsTrue()
-        {
-            using var server = SocketTestServer.SocketTestServerFactory(SocketImplementationType.Async, IPAddress.Loopback);
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(SocketType.Stream, ProtocolType.Tcp);
-            using Connection connection = await factory.ConnectAsync(server.EndPoint);
-
-            connection.ConnectionProperties.TryGet(out Socket socket);
-            Assert.True(socket.NoDelay);
-        }
-
-        [Fact]
-        public void ConnectAsync_NullEndpoint_ThrowsArgumentNullException()
-        {
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(SocketType.Stream, ProtocolType.Tcp);
-            Assert.ThrowsAsync<ArgumentNullException>(() => factory.ConnectAsync(null).AsTask());
-        }
-
-        // TODO: On OSX and Windows7 connection failures seem to fail with unexpected SocketErrors that are mapped to NetworkError.Unknown. This needs an investigation.
-        // Related: https://github.com/dotnet/runtime/pull/40565
-        public static bool PlatformHasReliableConnectionFailures => !PlatformDetection.IsOSX && !PlatformDetection.IsWindows7 && !PlatformDetection.IsFreeBSD;
-
-        [ConditionalFact(nameof(PlatformHasReliableConnectionFailures))]
-        public async Task ConnectAsync_WhenRefused_ThrowsNetworkException()
-        {
-            using Socket notListening = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-            int port = notListening.BindToAnonymousPort(IPAddress.Loopback);
-            var endPoint = new IPEndPoint(IPAddress.Loopback, port);
-
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-
-            NetworkException ex = await Assert.ThrowsAsync<NetworkException>(() => factory.ConnectAsync(endPoint).AsTask());
-            Assert.Equal(NetworkError.ConnectionRefused, ex.NetworkError);
-        }
-
-        [OuterLoop] // TimedOut and HostNotFound is slow on Windows
-        [ConditionalFact(nameof(PlatformHasReliableConnectionFailures))]
-        public async Task ConnectAsync_WhenHostNotFound_ThrowsNetworkException()
-        {
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-
-            // Unassigned as per https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt
-            int unusedPort = 8;
-            DnsEndPoint endPoint = new DnsEndPoint(System.Net.Test.Common.Configuration.Sockets.InvalidHost, unusedPort);
-
-            NetworkException ex = await Assert.ThrowsAsync<NetworkException>(() => factory.ConnectAsync(endPoint).AsTask());
-            Assert.Equal(NetworkError.HostNotFound, ex.NetworkError);
-        }
-
-        [OuterLoop] // TimedOut and HostNotFound is slow on Windows
-        [ConditionalFact(nameof(PlatformHasReliableConnectionFailures))]
-        public async Task ConnectAsync_TimedOut_ThrowsNetworkException()
-        {
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-
-            IPEndPoint doesNotExist = new IPEndPoint(IPAddress.Parse("1.2.3.4"), 23);
-
-            NetworkException ex = await Assert.ThrowsAsync<NetworkException>(() => factory.ConnectAsync(doesNotExist).AsTask());
-            Assert.Equal(NetworkError.TimedOut, ex.NetworkError);
-        }
-
-        // On Windows, connection timeout takes 21 seconds. Abusing this behavior to test the cancellation logic
-        [Fact]
-        [PlatformSpecific(TestPlatforms.Windows)] 
-        public async Task ConnectAsync_WhenCancelled_ThrowsTaskCancelledException()
-        {
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(SocketType.Stream, ProtocolType.Tcp);
-            IPEndPoint doesNotExist = new IPEndPoint(IPAddress.Parse("1.2.3.4"), 23);
-
-            CancellationTokenSource cts = new CancellationTokenSource();
-            cts.CancelAfter(100);
-
-            OperationCanceledException ex = await Assert.ThrowsAsync<OperationCanceledException>(() => factory.ConnectAsync(doesNotExist, cancellationToken: cts.Token).AsTask());
-            Assert.Equal(cts.Token, ex.CancellationToken);
-        }
-
-        [Fact]
-        public async Task ConnectAsync_WhenCancelledBeforeInvocation_ThrowsTaskCancelledException()
-        {
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(SocketType.Stream, ProtocolType.Tcp);
-            IPEndPoint doesNotExist = new IPEndPoint(IPAddress.Parse("1.2.3.4"), 23);
-
-            CancellationToken cancellationToken = new CancellationToken(true);
-
-            OperationCanceledException ex = await Assert.ThrowsAsync<OperationCanceledException>(() => factory.ConnectAsync(doesNotExist, cancellationToken: cancellationToken).AsTask());
-            Assert.Equal(cancellationToken, ex.CancellationToken);
-        }
-
-        [Theory]
-        [MemberData(nameof(GetConnectData))]
-        public async Task Connection_Stream_ReadWrite_Success(EndPoint endPoint, SocketType socketType, ProtocolType protocolType)
-        {
-            endPoint = RecreateUdsEndpoint(endPoint);
-            using var server = SocketTestServer.SocketTestServerFactory(SocketImplementationType.Async, endPoint, protocolType);
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(endPoint.AddressFamily, socketType, protocolType);
-
-            using Connection connection = await factory.ConnectAsync(server.EndPoint);
-
-            Stream stream = connection.Stream;
-
-            byte[] sendData = { 1, 2, 3 };
-            byte[] receiveData = new byte[sendData.Length];
-
-            await stream.WriteAsync(sendData);
-            await stream.FlushAsync();
-            await stream.ReadAsync(receiveData);
-
-            // The test server should echo the data:
-            Assert.Equal(sendData, receiveData);
-        }
-
-        [Theory]
-        [MemberData(nameof(GetConnectData))]
-        public async Task Connection_EndpointsAreCorrect(EndPoint endPoint, SocketType socketType, ProtocolType protocolType)
-        {
-            endPoint = RecreateUdsEndpoint(endPoint);
-            using var server = SocketTestServer.SocketTestServerFactory(SocketImplementationType.Async, endPoint, protocolType);
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(endPoint.AddressFamily, socketType, protocolType);
-            using Connection connection = await factory.ConnectAsync(server.EndPoint);
-
-            // Checking for .ToString() result, because UnixDomainSocketEndPoint equality doesn't seem to be implemented
-            Assert.Equal(server.EndPoint.ToString(), connection.RemoteEndPoint.ToString()); 
-            Assert.IsType(endPoint.GetType(), connection.LocalEndPoint);
-        }
-
-        [Theory]
-        [MemberData(nameof(GetConnectData))]
-        public async Task Connection_Pipe_ReadWrite_Success(EndPoint endPoint, SocketType socketType, ProtocolType protocolType)
-        {
-            endPoint = RecreateUdsEndpoint(endPoint);
-            using var server = SocketTestServer.SocketTestServerFactory(SocketImplementationType.Async, endPoint, protocolType);
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(endPoint.AddressFamily, socketType, protocolType);
-
-
-            using Connection connection = await factory.ConnectAsync(server.EndPoint);
-
-            IDuplexPipe pipe = connection.Pipe;
-
-            byte[] sendData = { 1, 2, 3 };
-            using MemoryStream receiveTempStream = new MemoryStream();
-
-            await pipe.Output.WriteAsync(sendData);
-            ReadResult rr = await pipe.Input.ReadAsync();
-
-            // The test server should echo the data:
-            Assert.True(rr.Buffer.FirstSpan.SequenceEqual(sendData));
-        }
-
-        [Theory]
-        [InlineData(false, false)]
-        [InlineData(false, true)]
-        [InlineData(true, false)]
-        [InlineData(true, true)]
-        public async Task Connection_Dispose_ClosesSocket(bool disposeAsync, bool usePipe)
-        {
-            using var server = SocketTestServer.SocketTestServerFactory(SocketImplementationType.Async, IPAddress.Loopback);
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-            Connection connection = await factory.ConnectAsync(server.EndPoint);
-
-            Stream stream = usePipe ? null : connection.Stream;
-            if (usePipe) _ = connection.Pipe;
-            connection.ConnectionProperties.TryGet(out Socket socket);
-
-            if (disposeAsync) await connection.DisposeAsync();
-            else connection.Dispose();
-
-            Assert.False(socket.Connected);
-
-            if (!usePipe)
-            {
-                // In this case we can also verify if the stream is disposed
-                Assert.Throws<ObjectDisposedException>(() => stream.Write(new byte[1]));
-            }
-        }
-
-        [Theory]
-        [InlineData(true, ConnectionCloseMethod.GracefulShutdown)]
-        [InlineData(true, ConnectionCloseMethod.Immediate)]
-        [InlineData(true, ConnectionCloseMethod.Abort)]
-        [InlineData(false, ConnectionCloseMethod.GracefulShutdown)]
-        [InlineData(false, ConnectionCloseMethod.Immediate)]
-        [InlineData(false, ConnectionCloseMethod.Abort)]
-        public async Task Connection_CloseAsync_ClosesSocket(bool usePipe, ConnectionCloseMethod method)
-        {
-            using var server = SocketTestServer.SocketTestServerFactory(SocketImplementationType.Async, IPAddress.Loopback);
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-            Connection connection = await factory.ConnectAsync(server.EndPoint);
-
-            Stream stream = null;
-            if (usePipe)
-            {
-                _ = connection.Pipe;
-            }
-            else
-            {
-                stream = connection.Stream;
-            }
-
-            connection.ConnectionProperties.TryGet(out Socket socket);
-
-            await connection.CloseAsync(method);
-
-            Assert.Throws<ObjectDisposedException>(() => socket.Send(new byte[1]));
-
-            if (!usePipe) // No way to observe the stream if we work with the pipe
-            {
-                Assert.Throws<ObjectDisposedException>(() => stream.Write(new byte[1]));
-            }
-        }
-
-        // Test scenario based on:
-        // https://devblogs.microsoft.com/dotnet/system-io-pipelines-high-performance-io-in-net/
-        [Theory(Timeout = 60000)] // Give 1 minute to fail, in case of a hang
-        [InlineData(30)]
-        [InlineData(500)]
-        [OuterLoop("Might run long")]
-        public async Task Connection_Pipe_ReadWrite_Integration(int totalLines)
-        {
-            using SocketsConnectionFactory factory = new SocketsConnectionFactory(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-            using SocketTestServer echoServer = SocketTestServer.SocketTestServerFactory(SocketImplementationType.Async, IPAddress.Loopback);
-            
-            Socket serverSocket = null;
-            echoServer.Accepted += s => serverSocket = s;
-
-            using Connection connection = await factory.ConnectAsync(echoServer.EndPoint);
-
-            IDuplexPipe pipe = connection.Pipe;
-
-            ConcurrentQueue<string> linesSent = new ConcurrentQueue<string>();
-            Task writerTask = Task.Factory.StartNew(async () =>
-            {
-                byte[] endl = Encoding.ASCII.GetBytes("\n");
-                StringBuilder expectedLine = new StringBuilder();
-
-                for (int i = 0; i < totalLines; i++)
-                {
-                    int words = i % 10 + 1;
-                    for (int j = 0; j < words; j++)
-                    {
-                        string word = Guid.NewGuid() + " ";
-                        Encoding.ASCII.GetBytes(word, pipe.Output);
-                        expectedLine.Append(word);
-                    }
-                    linesSent.Enqueue(expectedLine.ToString());
-                    await pipe.Output.WriteAsync(endl);
-                    expectedLine.Clear();
-                }
-
-                await pipe.Output.FlushAsync();
-
-                // This will also trigger completion on the reader. TODO: Fix
-                // await pipe.Output.CompleteAsync();
-            }, TaskCreationOptions.LongRunning);
-
-            // The test server should echo the data sent to it                      
-
-            PipeReader reader = pipe.Input;
-
-            int lineIndex = 0;
-
-            void ProcessLine(ReadOnlySequence<byte> lineBuffer)
-            {
-                string line = Encoding.ASCII.GetString(lineBuffer);
-                Assert.True(linesSent.TryDequeue(out string expectedLine));
-                Assert.Equal(expectedLine, line);
-                lineIndex++;
-
-                // Received everything, shut down the server, so next read will complete:
-                if (lineIndex == totalLines) serverSocket.Shutdown(SocketShutdown.Both);
-            }
-
-            while (true)
-            {
-                try
-                {
-                    ReadResult result = await reader.ReadAsync();
-
-                    ReadOnlySequence<byte> buffer = result.Buffer;
-                    SequencePosition? position = null;
-
-                    // Stop reading if there's no more data coming
-                    if (result.IsCompleted)
-                    {
-                        break;
-                    }
-
-                    do
-                    {
-                        // Look for a EOL in the buffer
-                        position = buffer.PositionOf((byte)'\n');
-
-                        if (position != null)
-                        {
-                            // Process the line
-                            ProcessLine(buffer.Slice(0, position.Value));
-
-                            // Skip the line + the \n character (basically position)
-                            buffer = buffer.Slice(buffer.GetPosition(1, position.Value));
-                        }
-                    }
-                    while (position != null);
-
-                    // Tell the PipeReader how much of the buffer we have consumed
-                    reader.AdvanceTo(buffer.Start, buffer.End);
-                }
-                catch (SocketException)
-                {
-                    // terminate
-                }
-
-            }
-
-            // Mark the PipeReader as complete
-            await reader.CompleteAsync();
-            await writerTask;
-
-            // TODO: If this is done in the end of writerTask the socket stops working
-            Assert.Equal(totalLines, lineIndex);
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/Sockets/SocketsConnectionFactoryTests_DerivedFactory.cs b/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/Sockets/SocketsConnectionFactoryTests_DerivedFactory.cs
deleted file mode 100644 (file)
index 766d21c..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Diagnostics.CodeAnalysis;
-using System.IO;
-using System.IO.Pipelines;
-using System.Net.Connections;
-using System.Net.Sockets;
-using System.Net.Sockets.Tests;
-using System.Threading.Tasks;
-using Xunit;
-
-namespace System.Net.Connections.Tests
-{
-    [ConditionalClass(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoRuntime))]
-    public class SocketsConnectionFactoryTests_DerivedFactory
-    {
-        private class CustomConnectionOptionsValues
-        {
-            public bool NoDelay { get; set; }
-
-            public bool DualMode { get; set; }
-        }
-
-        private class CustomConnectionOptions : IConnectionProperties
-        {
-            public CustomConnectionOptionsValues Values { get; } = new CustomConnectionOptionsValues();
-
-            public CustomConnectionOptions()
-            {
-            }
-
-            public bool TryGet(Type propertyKey, [NotNullWhen(true)] out object property)
-            {
-                if (propertyKey == typeof(CustomConnectionOptionsValues))
-                {
-                    property = Values;
-                    return true;
-                }
-
-                property = null;
-                return false;
-            }
-        }
-
-        private sealed class CustomFactory : SocketsConnectionFactory
-        {
-            public CustomFactory() : base(SocketType.Stream, ProtocolType.Tcp)
-            {
-            }
-
-            protected override Socket CreateSocket(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType, EndPoint endPoint, IConnectionProperties options)
-            {
-                Socket socket = new Socket(addressFamily, socketType, protocolType);
-
-                if (options.TryGet(out CustomConnectionOptionsValues vals))
-                {
-                    socket.NoDelay = vals.NoDelay;
-                    socket.DualMode = vals.DualMode;
-                }
-
-                return socket;
-            }
-        }
-
-        private readonly CustomFactory _factory = new CustomFactory();
-        private readonly CustomConnectionOptions _options = new CustomConnectionOptions();
-        private readonly IPEndPoint _endPoint = new IPEndPoint(IPAddress.IPv6Loopback, 0);
-
-        [Fact]
-        public async Task DerivedFactory_CanShimSocket()
-        {
-            using var server = SocketTestServer.SocketTestServerFactory(SocketImplementationType.Async, _endPoint);
-            using Connection connection = await _factory.ConnectAsync(server.EndPoint, _options);
-            connection.ConnectionProperties.TryGet(out Socket socket);
-
-            Assert.Equal(_options.Values.NoDelay, socket.NoDelay);
-            Assert.Equal(_options.Values.DualMode, socket.DualMode);
-        }
-    }
-}
diff --git a/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/System.Net.Connections.Tests.csproj b/src/libraries/System.Net.Connections/tests/System.Net.Connections.Tests/System.Net.Connections.Tests.csproj
deleted file mode 100644 (file)
index 7ddfadf..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <!-- Test on same targets as System.Net.Socket.Tests -->
-    <TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
-    <IgnoreForCI Condition="'$(TargetOS)' == 'Browser'">true</IgnoreForCI>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="$(CommonPath)System\Threading\Tasks\TaskToApm.cs" Link="Common\System\Threading\Tasks\TaskToApm.cs" />
-    <Compile Include="ConnectionBaseTest.cs" />
-    <Compile Include="ConnectionTest.cs" />
-    <Compile Include="ConnectionWithoutStreamOrPipe.cs" />
-    <Compile Include="MockConnection.cs" />
-    <Compile Include="MockPipe.cs" />
-    <Compile Include="MockPipeReader.cs" />
-    <Compile Include="MockPipeWriter.cs" />
-    <Compile Include="MockStream.cs" />
-    <Compile Include="Sockets/SocketsConnectionFactoryTests.cs" />
-    <Compile Include="Sockets/SocketsConnectionFactoryTests_DerivedFactory.cs" />
-    <!-- Common test files needed for SocketTestServer and other Socket test utilities -->
-    <Compile Include="$(CommonTestPath)System\Net\Configuration.cs" Link="SocketCommon\Configuration.cs" />
-    <Compile Include="$(CommonTestPath)System\Net\Configuration.Sockets.cs" Link="SocketCommon\Configuration.Sockets.cs" />
-    <Compile Include="$(CommonTestPath)System\Net\Sockets\TestSettings.cs" Link="SocketCommon\TestSettings.cs" />
-    <Compile Include="$(CommonTestPath)System\Net\VerboseTestLogging.cs" Link="Common\System\Net\VerboseTestLogging.cs" />
-    <Compile Include="$(CommonTestPath)System\Net\EventSourceTestLogging.cs" Link="Common\System\Net\EventSourceTestLogging.cs" />
-    <Compile Include="$(CommonTestPath)System\Net\Sockets\SocketTestExtensions.cs" Link="SocketCommon\SocketTestExtensions.cs" />
-    <Compile Include="$(CommonTestPath)System\Net\Sockets\SocketTestServer.cs" Link="SocketCommon\SocketTestServer.cs" />
-    <Compile Include="$(CommonTestPath)System\Net\Sockets\SocketTestServerAsync.cs" Link="SocketCommon\SocketTestServerAsync.cs" />
-    <Compile Include="$(CommonTestPath)System\Net\Sockets\SocketTestServerAPM.cs" Link="SocketCommon\SocketTestServerAPM.cs" />
-    <Compile Include="$(CommonTestPath)System\Net\Sockets\SocketImplementationType.cs" Link="SocketCommon\SocketImplementationType.cs" />
-    <Compile Include="$(CommonTestPath)System\Threading\Tasks\TaskTimeoutExtensions.cs" Link="Common\System\Threading\Tasks\TaskTimeoutExtensions.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\..\..\System.IO.Pipelines\src\System.IO.Pipelines.csproj" />
-    <ProjectReference Include="..\..\..\System.Net.Connections\src\System.Net.Connections.csproj" />
-  </ItemGroup>
-
-</Project>
index e9d7510..f22b16c 100644 (file)
@@ -384,7 +384,6 @@ g_Framework_Assemblies = [
     'System.Linq.Queryable.dll',
     'System.Management.dll',
     'System.Memory.dll',
-    'System.Net.Connections.dll',
     'System.Net.dll',
     'System.Net.Http.dll',
     'System.Net.Http.Json.dll',