using System.Collections.Generic; namespace Masuit.Tools.Hardware { /// /// CPU模型 /// public class CpuInfo { private static readonly List _locals = SystemInfo.GetCpuInfo(); /// /// 本地实例 /// public static List Locals => _locals; /// /// 获取CPU核心数 /// public static int ProcessorCount => SystemInfo.ProcessorCount; /// /// 获取CPU占用率 % /// public static float CpuLoad => SystemInfo.CpuLoad; /// /// 设备ID /// public string DeviceID { get; set; } /// /// CPU型号 /// public string Type { get; set; } /// /// CPU厂商 /// public string Manufacturer { get; set; } /// /// CPU最大睿频 /// public string MaxClockSpeed { get; set; } /// /// CPU的时钟频率 /// public string CurrentClockSpeed { get; set; } /// /// CPU核心数 /// public int NumberOfCores { get; set; } /// /// 逻辑处理器核心数 /// public int NumberOfLogicalProcessors { get; set; } /// /// CPU位宽 /// public string DataWidth { get; set; } /// /// 核心温度 /// public double Temperature => SystemInfo.GetCPUTemperature(); /// /// 序列号 /// public string SerialNumber { get; set; } } }