Address outstanding issues with System.Net MatchingRefApiCompatBaselines (#43230)
authorStephen Toub <stoub@microsoft.com>
Fri, 9 Oct 2020 21:18:36 +0000 (17:18 -0400)
committerGitHub <noreply@github.com>
Fri, 9 Oct 2020 21:18:36 +0000 (17:18 -0400)
src/libraries/Common/src/System/Net/Sockets/ProtocolFamily.cs
src/libraries/Common/src/System/Net/Sockets/ProtocolType.cs
src/libraries/System.Net.NameResolution/src/MatchingRefApiCompatBaseline.txt [deleted file]
src/libraries/System.Net.Primitives/src/MatchingRefApiCompatBaseline.txt
src/libraries/System.Net.Requests/src/MatchingRefApiCompatBaseline.txt [deleted file]
src/libraries/System.Net.Requests/src/System/Net/HttpWebRequest.cs

index b5a19da..6241448 100644 (file)
@@ -3,12 +3,15 @@
 
 #if SYSTEM_NET_SOCKETS_DLL
 namespace System.Net.Sockets
+{
+    public
 #else
 using System.Net.Sockets;
 namespace System.Net.Internals
-#endif
 {
-    public enum ProtocolFamily
+    internal
+#endif
+    enum ProtocolFamily
     {
         Unknown = AddressFamily.Unknown,
         Unspecified = AddressFamily.Unspecified,
index eadb23b..c93b254 100644 (file)
@@ -3,12 +3,15 @@
 
 #if SYSTEM_NET_SOCKETS_DLL
 namespace System.Net.Sockets
+{
+    public
 #else
 namespace System.Net.Internals
-#endif
 {
+    internal
+#endif
     // Specifies the protocols that the Socket class supports.
-    public enum ProtocolType
+    enum ProtocolType
     {
         IP = 0, // dummy for IP
 
diff --git a/src/libraries/System.Net.NameResolution/src/MatchingRefApiCompatBaseline.txt b/src/libraries/System.Net.NameResolution/src/MatchingRefApiCompatBaseline.txt
deleted file mode 100644 (file)
index eac7819..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-Compat issues with assembly System.Net.NameResolution:
-TypesMustExist : Type 'System.Net.Internals.ProtocolFamily' does not exist in the reference but it does exist in the implementation.
-TypesMustExist : Type 'System.Net.Internals.ProtocolType' does not exist in the reference but it does exist in the implementation.
-Total Issues: 2
index 3df3d08..683ffcf 100644 (file)
@@ -1,3 +1,4 @@
+# Public in the implementation to maintain binary serialization compatibility as the System shim needs to have access to type-forward to these
 Compat issues with assembly System.Net.Primitives:
 TypesMustExist : Type 'System.Net.CookieVariant' does not exist in the reference but it does exist in the implementation.
 TypesMustExist : Type 'System.Net.PathList' does not exist in the reference but it does exist in the implementation.
diff --git a/src/libraries/System.Net.Requests/src/MatchingRefApiCompatBaseline.txt b/src/libraries/System.Net.Requests/src/MatchingRefApiCompatBaseline.txt
deleted file mode 100644 (file)
index 311d662..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Compat issues with assembly System.Net.Requests:
-MembersMustExist : Member 'public void System.Net.HttpWebRequest..ctor()' does not exist in the reference but it does exist in the implementation.
-Total Issues: 1
index 327e60c..7beaa79 100644 (file)
@@ -161,11 +161,6 @@ namespace System.Net
         private const string ChunkedHeader = "chunked";
 
         [Obsolete(Obsoletions.WebRequestMessage, DiagnosticId = Obsoletions.WebRequestDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
-        public HttpWebRequest()
-        {
-        }
-
-        [Obsolete(Obsoletions.WebRequestMessage, DiagnosticId = Obsoletions.WebRequestDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
         protected HttpWebRequest(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext)
         {
             throw new PlatformNotSupportedException();