np
np copied to clipboard
mac10.15.5 系统下使用osinfoto类会空异常
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { OS = OSPlatform.OSX.ToString();
TotalPhysicalMemory = PlatformForLinux.MemInfo("MemTotal:");
FreePhysicalMemory = PlatformForLinux.MemInfo("MemAvailable:");
LogicalDisk = PlatformForLinux.LogicalDisk();
ProcessorName = PlatformForLinux.CpuInfo("model name");
TickCount = PlatformForLinux.RunTime();
}
执行了了PlatformForLinux.MemInfo("MemTotal:");便报异常:Object reference not set to an instance of an object.
Mac 没有测试,该方法为提取 cat /proc/meminfo 的结果
@netnr 能更新处理一下对osx系统的支持吗
目前没有环境,不好处理