From 92d4f79eaca8c17fba74167cf93f17626e825b08 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 26 Oct 2016 11:39:30 +0200 Subject: [PATCH] [System] Tweak define to exclude System.Net.WebProxy.CreateDefaultProxy and update corresponding test. --- mcs/class/System/Test/System.Net/WebClientTest.cs | 3 +++ mcs/class/referencesource/System/net/System/Net/webproxy.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mcs/class/System/Test/System.Net/WebClientTest.cs b/mcs/class/System/Test/System.Net/WebClientTest.cs index 3b048781f29..30531be7e88 100644 --- a/mcs/class/System/Test/System.Net/WebClientTest.cs +++ b/mcs/class/System/Test/System.Net/WebClientTest.cs @@ -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 (); diff --git a/mcs/class/referencesource/System/net/System/Net/webproxy.cs b/mcs/class/referencesource/System/net/System/Net/webproxy.cs index b61133a980a..15840cd7022 100644 --- a/mcs/class/referencesource/System/net/System/Net/webproxy.cs +++ b/mcs/class/referencesource/System/net/System/Net/webproxy.cs @@ -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 (); -- 2.25.1