Add a static result to detect if the platform is Windows based.

This commit is contained in:
2018-11-15 21:25:40 +00:00
parent 133dcc7d2e
commit 158356b353
2 changed files with 5 additions and 1 deletions

View File

@@ -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;
}
}