[System] Suppress a few instances of CS0618 obsolete warnings
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Sun, 16 Jul 2017 00:43:10 +0000 (02:43 +0200)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Sun, 16 Jul 2017 00:44:03 +0000 (02:44 +0200)
mcs/class/System/Mono.Net.Security/MonoTlsStream.cs
mcs/class/System/System.Net/AuthenticationManager.cs
mcs/class/System/System.Net/Dns.cs
mcs/class/System/System.Net/EndPointManager.cs
mcs/class/System/System.Net/FtpWebRequest.cs
mcs/class/System/System.Net/HttpWebRequest.cs

index 1fce2eab1144d3899423c1d58d0ee8bef3ca1afe..ba6d5197231e63d13c9c732be3ef00a742219d1c 100644 (file)
@@ -94,6 +94,7 @@ namespace Mono.Net.Security
 
                        ChainValidationHelper.Create (provider, ref settings, this);
 #else
+                       status = WebExceptionStatus.SecureChannelFailure;
                        throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
 #endif
                }
index 98200b45b4a01ad613756f7d16839f978ce1e08f..89562a5b4c2e4afdd9627a258c2bae46a2920932 100644 (file)
@@ -69,7 +69,9 @@ namespace System.Net
                                        }
                                }
 #else
+#pragma warning disable 618
                                ConfigurationSettings.GetConfig ("system.net/authenticationModules");
+#pragma warning restore 618
 #endif
                        }
                }
index dac834884441e8ccd8764f846dcea5289ebd073b..5338cd09d012f8490dcc5351ef3ed839b8e2829b 100644 (file)
@@ -320,9 +320,11 @@ namespace System.Net {
                                try {
                                        IPAddress newAddress = IPAddress.Parse(h_addrlist[i]);
 
+#pragma warning disable 618
                                        if( (Socket.SupportsIPv6 && newAddress.AddressFamily == AddressFamily.InterNetworkV6) ||
                                            (Socket.SupportsIPv4 && newAddress.AddressFamily == AddressFamily.InterNetwork) )
                                                addrlist.Add(newAddress);
+#pragma warning restore 618
                                } catch (ArgumentNullException) {
                                        /* Ignore this, as the
                                         * internal call might have
@@ -393,7 +395,9 @@ namespace System.Net {
                        if (hostNameOrAddress.Length > 0 && IPAddress.TryParse (hostNameOrAddress, out addr))
                                return GetHostEntry (addr);
 
+#pragma warning disable 618
                        return GetHostByName (hostNameOrAddress);
+#pragma warning restore 618
                }
 
                public static IPHostEntry GetHostEntry (IPAddress address)
index 2f1658ab113ee155ffbb146e8c69ca85652d8abd..9a103f45cd72898eaec07552c2b693cde4f9816f 100644 (file)
@@ -84,7 +84,9 @@ namespace System.Net {
                                addr = IPAddress.Any;
                        else if (IPAddress.TryParse(host, out addr) == false){
                                try {
+#pragma warning disable 618
                                        IPHostEntry iphost = Dns.GetHostByName(host);
+#pragma warning restore 618
                                        if (iphost != null)
                                                addr = iphost.AddressList[0];
                                        else
index c0ea1b551195e55dd06e5919c44646ee5548dc8e..3121db3d1729daef56a67b3dea4af5fdb49897f0 100644 (file)
@@ -113,7 +113,9 @@ namespace System.Net
                internal FtpWebRequest (Uri uri) 
                {
                        this.requestUri = uri;
+#pragma warning disable 618
                        this.proxy = GlobalProxySelection.Select;
+#pragma warning restore 618
                }
 
                static Exception GetMustImplement ()
index 4f7d1d7d7baf1655780df5aba32bd4b84619f3b3..d05722051f93453ff405de19e8c76bf99fa2d380 100644 (file)
@@ -134,7 +134,9 @@ namespace System.Net
                {
                        defaultMaxResponseHeadersLength = 64 * 1024;
 #if !MOBILE
+#pragma warning disable 618
                        NetConfig config = ConfigurationSettings.GetConfig ("system.net/settings") as NetConfig;
+#pragma warning restore 618
                        if (config != null) {
                                int x = config.MaxResponseHeadersLength;
                                if (x != -1)