X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Runtime.InteropServices.RuntimeInformation%2FSystem.Runtime.InteropServices%2FRuntimeInformation.cs;h=d775167495ea166dcb5719a25ea83b3e87cd3577;hb=ff7a2a5114d6da678a5a75c5eebf0731db4f3aed;hp=24be90472ff81847e7ab0bd102777cc4d2b07780;hpb=a9035d9e74a5a8365a6de602b7f5a7a0b3f4fc90;p=mono.git diff --git a/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/RuntimeInformation.cs b/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/RuntimeInformation.cs index 24be90472ff..d775167495e 100644 --- a/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/RuntimeInformation.cs +++ b/mcs/class/System.Runtime.InteropServices.RuntimeInformation/System.Runtime.InteropServices/RuntimeInformation.cs @@ -38,28 +38,25 @@ namespace System.Runtime.InteropServices [DllImport ("__Internal")] extern static string mono_get_runtime_build_info (); - public static string FrameworkDescription - { - get - { + public static string FrameworkDescription { + get { return mono_get_runtime_build_info (); } } public static bool IsOSPlatform (OSPlatform osPlatform) { - // TODO: very barebones implementation - - if (Environment.OSVersion.Platform == PlatformID.Win32NT) + switch (Environment.OSVersion.Platform) { + case PlatformID.Win32NT: return osPlatform == OSPlatform.Windows; + case PlatformID.Unix: + if (File.Exists ("/usr/lib/libc.dylib")) + return osPlatform == OSPlatform.OSX; - if (Environment.OSVersion.Platform == PlatformID.Unix && File.Exists ("/usr/lib/libc.dylib")) - return osPlatform == OSPlatform.OSX; - - if (Environment.OSVersion.Platform == PlatformID.Unix) return osPlatform == OSPlatform.Linux; - - return false; + default: + return false; + } } public static string OSDescription