示例#1
0
 public string GetOSName(Process process)
 {
     if (_osInfo == null)
     {
         _osInfo = OSHelper.GetComputerDescription();
     }
     return(_osInfo.ProductName);
 }
示例#2
0
 protected override IUnixWbemClassHandler Build(object nativeObj)
 {
     return(base.Build(nativeObj).WithProperty(PathField, System.Net.Dns.GetHostName())
            .WithMethod("Rename", new UnixCimMethodInfo {
         Name = "Rename"
     })
            .WithProperty("Description", OSHelper.GetComputerDescription().ToString())
            .WithProperty("Domain", GetDomain()));
 }
示例#3
0
        public string GetOSVersion(Process process)
        {
            if (_osInfo == null)
            {
                _osInfo = OSHelper.GetComputerDescription();
            }
            var version = _osInfo.Version;

            if (!string.IsNullOrEmpty(_osInfo.BuildNumber))
            {
                version += " " + _osInfo.BuildNumber;
            }
            return(version);
        }
示例#4
0
 protected override IUnixWbemClassHandler Build(object nativeObj)
 {
     return(base.Build(nativeObj).WithProperty(PathField, System.Net.Dns.GetHostName())
            .WithProperty("Description", OSHelper.GetComputerDescription().ToString()));;
 }