Merge pull request #3796 from ntherning/windows-backend-for-MemoryMappedFile
[mono.git] / mcs / class / referencesource / System / net / System / Net / webproxy.cs
index dc7fdb26301b4cf69be900eb6bfd5857bb92cb6c..15840cd7022b9729306b19eac0cf0382fbe0f29a 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 FEATURE_NO_BSD_SOCKETS
+            throw new PlatformNotSupportedException ();
+#elif MONOTOUCH
             return Mono.Net.CFNetwork.GetDefaultProxy ();
 #elif MONODROID
             // Return the system web proxy.  This only works for ICS+.