Quellcode durchsuchen

Load the correct type for MacOSX (as opposed to iOS)

Jeffrey Stedfast vor 14 Jahren
Ursprung
Commit
67e45d8ca4
1 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen
  1. 5 1
      mcs/class/System/System.Net/WebRequest.cs

+ 5 - 1
mcs/class/System/System.Net/WebRequest.cs

@@ -70,7 +70,11 @@ namespace System.Net
 		static WebRequest ()
 		{
 			if (Platform.IsMacOS) {
+#if MONOTOUCH
 				Type type = Type.GetType ("MonoTouch.CoreFoundation.CFNetwork, monotouch");
+#else
+				Type type = Type.GetType ("MonoMac.CoreFoundation.CFNetwork, monomac");
+#endif
 				if (type != null)
 					cfGetDefaultProxy = type.GetMethod ("GetDefaultProxy");
 			}
@@ -355,7 +359,7 @@ namespace System.Net
 			
 			if (cfGetDefaultProxy != null)
 				return (IWebProxy) cfGetDefaultProxy.Invoke (null, null);
-						
+			
 			return new WebProxy ();
 		}
 #endif