public static bool IsRunningOn(AssertedPlatform assertedPlatform) { SystemReader systemReader = SystemReader.getInstance(); bool isRunningOnUnknownOS = (systemReader.getOperatingSystem() == PlatformType.Unknown); if (isRunningOnUnknownOS) { return(false); } bool isRunningOnWindows = (systemReader.getOperatingSystem() == PlatformType.Windows); if (isRunningOnWindows && assertedPlatform == AssertedPlatform.Windows) { return(true); } if (!isRunningOnWindows && assertedPlatform == AssertedPlatform.Mono) { return(true); } return(false); }