private readonly ISysEnvProvider _sysEnvProvider;
// 系统环境、CPU、内存信息
services.AddSingleton<ISysEnvProvider, SysEnvProvider>();
/// <summary>
/// 测试接口是否正式启动
/// </summary>
/// <returns></returns>
[HttpGet("sysenv")]
public async Task<ResultDetail<SysEnvInformation>> GetSysEnvInformation()
{
return new ResultDetail<SysEnvInformation>
{
Success = true,
Data = await _sysEnvProvider.GetSysEnv()
};
}
文档更新时间: 2022-04-14 09:30 作者:admin