diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2016-10-27 01:32:31 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-27 01:32:31 +0300 |
commit | bc72a85bea8d9dddebaa5610c5c55f4f7b7ab131 (patch) | |
tree | 7d3419781eac9c817ef1b38e08447d9469a511f2 | |
parent | 8b8d4c41d2dd60ad4db5e046845145ac3818a9d5 (diff) | |
parent | 16b8979fd1698669499defc95cc069c0adf1e291 (diff) |
Merge pull request #3830 from rolfbjarne/watchos-fix-defaultproxy-test-4.8mono-4.8.0.262
[System] Tweak define to exclude System.Net.WebProxy.CreateDefaultProxy and update corresponding test.
-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 (); |