Merge pull request #3812 from rolfbjarne/watchos-no-cfnetwork
authorMarek Safar <marek.safar@gmail.com>
Mon, 24 Oct 2016 21:27:39 +0000 (23:27 +0200)
committerGitHub <noreply@github.com>
Mon, 24 Oct 2016 21:27:39 +0000 (23:27 +0200)
[System] Remove any CFNetwork usage from the watchOS profile. Fixes #45847.

mcs/class/System/ReferenceSources/AutoWebProxyScriptEngine.cs
mcs/class/System/monotouch_watch_System.dll.exclude.sources
mcs/class/referencesource/System/net/System/Net/webproxy.cs

index 4e4d2859b032021c4fe0bbaf2b0dc9f7fb081b2d..f3b840e8f7f56533be087a32001bfdabaacd9a82 100644 (file)
@@ -1,7 +1,9 @@
 using System.Collections;
 using System.Collections.Generic;
 using System.Text.RegularExpressions;
+#if !MONOTOUCH_WATCH
 using Mono.Net;
+#endif
 
 namespace System.Net
 {
index 1f1f61233b04f32ec4b5e7004d2673a8dd13f0d8..8c6728097b7129ea1850e496e88c4002d33a253b 100644 (file)
@@ -107,6 +107,7 @@ Mono.Net.Security/MonoTlsProviderWrapper.cs
 Mono.Net.Security/MonoTlsStream.cs
 Mono.Net.Security/NoReflectionHelper.cs
 Mono.Net.Security/SystemCertificateValidator.cs
+System.Net/MacProxy.cs
 System.Net.Mail/SmtpClient.cs
 System.Net.Security/SslStream.cs
 System.Net.Sockets/TcpClient.cs
index fe5858875faa8c20236f15eb604adbe491b20c26..b61133a980a9b7703f1a428ec686b7a199bd1d55 100644 (file)
@@ -504,7 +504,9 @@ namespace System.Net {
 #if MONO
         public static IWebProxy CreateDefaultProxy ()
         {
-#if MONOTOUCH
+#if MONOTOUCH_WATCH
+            throw new PlatformNotSupportedException ();
+#elif MONOTOUCH
             return Mono.Net.CFNetwork.GetDefaultProxy ();
 #elif MONODROID
             // Return the system web proxy.  This only works for ICS+.