[System] Remove any CFNetwork usage from the watchOS profile. Fixes #45847.
[mono.git] / mcs / class / referencesource / System / net / System / Net / webproxy.cs
index dc7fdb26301b4cf69be900eb6bfd5857bb92cb6c..b61133a980a9b7703f1a428ec686b7a199bd1d55 100644 (file)
@@ -414,7 +414,7 @@ namespace System.Net {
         /// </devdoc>
         [Obsolete("This method has been deprecated. Please use the proxy selected for you by default. http://go.microsoft.com/fwlink/?linkid=14202")]
         public static WebProxy GetDefaultProxy() {
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
             ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
             return new WebProxy(true);
@@ -437,7 +437,7 @@ namespace System.Net {
             if (useRegistry) {
                 // just make the proxy advanced, don't populate with any settings
                 // note - this will happen in the context of the user performing the deserialization (their proxy settings get read)
-#if !DISABLE_CAS_USE
+#if FEATURE_MONO_CAS
                 ExceptionHelper.WebPermissionUnrestricted.Demand();
 #endif
                 UnsafeUpdateFromRegistry();
@@ -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+.