diff options
author | Rolf Bjarne Kvinge <rolf@xamarin.com> | 2016-10-26 12:39:30 +0300 |
---|---|---|
committer | Rolf Bjarne Kvinge <rolf@xamarin.com> | 2016-10-26 21:36:19 +0300 |
commit | 16b8979fd1698669499defc95cc069c0adf1e291 (patch) | |
tree | 7d3419781eac9c817ef1b38e08447d9469a511f2 /mcs | |
parent | 8b8d4c41d2dd60ad4db5e046845145ac3818a9d5 (diff) |
[System] Tweak define to exclude System.Net.WebProxy.CreateDefaultProxy and update corresponding test.
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/System/Test/System.Net/WebClientTest.cs | 3 | ||||
-rw-r--r-- | mcs/class/referencesource/System/net/System/Net/webproxy.cs | 2 |
2 files changed, 4 insertions, 1 deletions
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 (); |