From 0533e129bf53f9c17282ca922033f881f0457940 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 15 Nov 2018 21:25:40 +0000 Subject: [PATCH] Add a static result to detect if the platform is Windows based. --- Interop/DetectOS.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Interop/DetectOS.cs b/Interop/DetectOS.cs index af2b86cb3..004e969f7 100644 --- a/Interop/DetectOS.cs +++ b/Interop/DetectOS.cs @@ -302,5 +302,10 @@ namespace DiscImageChef.CommonTypes.Interop [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string machine; } + + public static bool IsWindows => + GetRealPlatformID() == PlatformID.Win32NT || GetRealPlatformID() == PlatformID.Win32S || + GetRealPlatformID() == PlatformID.Win32Windows || GetRealPlatformID() == PlatformID.WinCE || + GetRealPlatformID() == PlatformID.WindowsPhone || GetRealPlatformID() == PlatformID.Xbox; } } \ No newline at end of file