[System] Tweak define to exclude System.Net.WebProxy.CreateDefaultProxy and update...
authorRolf Bjarne Kvinge <rolf@xamarin.com>
Wed, 26 Oct 2016 09:39:30 +0000 (11:39 +0200)
committerRolf Bjarne Kvinge <rolf@xamarin.com>
Wed, 26 Oct 2016 18:38:33 +0000 (20:38 +0200)
mcs/class/System/Test/System.Net/WebClientTest.cs
mcs/class/referencesource/System/net/System/Net/webproxy.cs

index 3b048781f29ad6a15109241cb99f362d55b2f521..30531be7e880c09a3d69330be30fbc807154b7dc 100644 (file)
@@ -1778,6 +1778,9 @@ namespace MonoTests.System.Net
                }
 
                [Test]
+#if FEATURE_NO_BSD_SOCKETS
+               [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
                public void DefaultProxy ()
                {
                        WebClient wc = new WebClient ();
index b61133a980a9b7703f1a428ec686b7a199bd1d55..15840cd7022b9729306b19eac0cf0382fbe0f29a 100644 (file)
@@ -504,7 +504,7 @@ namespace System.Net {
 #if MONO
         public static IWebProxy CreateDefaultProxy ()
         {
-#if MONOTOUCH_WATCH
+#if FEATURE_NO_BSD_SOCKETS
             throw new PlatformNotSupportedException ();
 #elif MONOTOUCH
             return Mono.Net.CFNetwork.GetDefaultProxy ();