using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace NetPanel.Help
{
public class SystemHelp
{
///
/// 是否 win系统
///
///
public static bool IsWindows()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return true;
}
return false;
}
///
/// 是否 linux 系统
///
///
public static bool IsLinux()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
return true;
}
return false;
}
///
/// 是否MacOs环境
///
///
public static bool IsOSX()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
return true;
}
return false;
}
}
}