private void SetInformationAboutOperationalSystem(SystemInformation systemInformation, IEnumerable<WmiObject> informationAboutOperationalSystem) { if (! this.TheListIsEmpty(informationAboutOperationalSystem)) { WmiObject wmiObject = informationAboutOperationalSystem.First(); systemInformation.SystemName = this.GetSystemName(wmiObject); systemInformation.SystemVersion = wmiObject.GetValueOf("Version").ToString(); } }
public SystemInfo CreateSystemInfo(SystemInformation systemInformation) { SystemInfo systemInfo = new SystemInfo(); systemInfo.Architecture = systemInformation.Architecture; systemInfo.SystemName = systemInformation.SystemName; systemInfo.SystemVersion = systemInformation.SystemVersion; systemInfo.PrimaryHostName = systemInformation.PrimaryHostName; this.SetNetworkInfo(systemInfo, systemInformation); return systemInfo; }
private void SetInformationAboutHostName(SystemInformation systemInformation,IEnumerable<WmiObject> informationAboutHostName) { if (! this.TheListIsEmpty(informationAboutHostName)) { WmiObject wmiObject = informationAboutHostName.First(); systemInformation.PrimaryHostName = this.GetHostName(wmiObject); systemInformation.Architecture = this.GetArchitecture(wmiObject); } }
private SystemInformation CreateSystemInformation() { SystemInformation sysInfo = new SystemInformation(); sysInfo.SystemName = "Windows Service Pack 1"; sysInfo.SystemVersion = "6.0.6001"; sysInfo.PrimaryHostName = "mss-rj-215.mss.modulo.com.br"; sysInfo.Interfaces = new List<NetworkInterface>(); sysInfo.Interfaces.Add(new NetworkInterface() { IpAddress = "172.16.3.72", MacAddress = "00-23-AE-B6-6F-BF", Name = "Intel(R) 82567LM-3 Gigabit Network Connection" }); return sysInfo; }
public static SystemInformation GetExpectedSystemInformation() { SystemInformation sysInfo = new SystemInformation(); sysInfo.SystemName = "Microsoft Windows Server 2008 Enterprise SP2"; sysInfo.SystemVersion = "6.0.6002"; sysInfo.Architecture = "INTEL32"; sysInfo.PrimaryHostName = "mss-rj-220.mss.modulo.com.br"; sysInfo.Interfaces = new List<NetworkInterface>(); sysInfo.Interfaces.Add(new NetworkInterface() { IpAddress = "172.16.3.166", MacAddress = "00 - 23 - AE - B6 - 6F - BF", Name = "Intel(R) 82567LM-3 Gigabit Network Connection" }); return sysInfo; }
public SystemInformation CreateSystemInformation(IEnumerable<WmiObject> informationAboutHostName, IEnumerable<WmiObject> informationAboutOperationalSystem, IEnumerable<WmiObject> informationAboutNetworkAdapter) { SystemInformation systemInformation = new SystemInformation(); this.SetInformationAboutHostName(systemInformation,informationAboutHostName); this.SetInformationAboutOperationalSystem(systemInformation, informationAboutOperationalSystem); this.SetInformationAboutNetworkAdapters(systemInformation, informationAboutNetworkAdapter); return systemInformation; }
private void SetNetworkInfo(SystemInfo systemInfo, SystemInformation systemInformation) { foreach (NetworkInterface network in systemInformation.Interfaces) { NetworkInfo networkInfo = new NetworkInfo(); networkInfo.MacAddress = network.MacAddress; networkInfo.Name = network.Name; networkInfo.IpAddress = network.IpAddress; systemInfo.NetworkInterfaces.Add(networkInfo); } }
private SystemInformation CreateSystemInformationInstance(CiscoIOSVersion myVersion, IList<NetworkInterface> myInterfaces) { var newSystemInformation = new SystemInformation() { SystemVersion = myVersion.VersionString, SystemName = myVersion.OSName, Architecture = myVersion.Architecture, PrimaryHostName = myVersion.HostName, Interfaces = myInterfaces }; return newSystemInformation; }
private void SetInformationAboutNetworkAdapters(SystemInformation systemInformation, IEnumerable<WmiObject> informationAboutNetworkAdapter) { if (!this.TheListIsEmpty(informationAboutNetworkAdapter)) { WmiObject wmiObject = informationAboutNetworkAdapter.First(); NetworkInterface networkInterface = new NetworkInterface(); networkInterface.IpAddress = ((string[])wmiObject.GetValueOf("IPAddress"))[0]; networkInterface.MacAddress = wmiObject.GetValueOf("MACAddress").ToString(); networkInterface.Name = wmiObject.GetValueOf("Description").ToString(); systemInformation.Interfaces.Add(networkInterface); } }
private SystemInformation CreateSystemInformationInstance(SysInfo collectedUnixSystemInformation) { var newSystemInformation = new SystemInformation() { Architecture = collectedUnixSystemInformation.Architecture, PrimaryHostName = collectedUnixSystemInformation.Hostname, SystemName = collectedUnixSystemInformation.OS, SystemVersion = collectedUnixSystemInformation.OSVersion }; foreach (var netInterface in collectedUnixSystemInformation.Interfaces) { var newNetworkInterface = this.CreateNetworkInterfaceInstanceFromInterfaceState(netInterface); newSystemInformation.Interfaces.Add(newNetworkInterface); } return newSystemInformation; }
private SystemInformation CreateSystemInformation() { SystemInformation systemInformation = new SystemInformation(); systemInformation.SystemName = "unknown Service Pack 1"; systemInformation.SystemVersion = "6.0.6001"; systemInformation.PrimaryHostName = "mss-rj-007.mss.modulo.com.br"; systemInformation.Architecture = "INTEL32"; NetworkInterface networkInfterface = new NetworkInterface() { Name = "Intel(R) 82566DM Gigabit Network Connection", IpAddress = "172.16.3.33", MacAddress = "00-1E-C9-1D-72-4E" }; systemInformation.Interfaces.Add(networkInfterface); return systemInformation; }
public void AddSystemInformation(SystemInformation systemInformation) { this.probeResult.SystemInformation = systemInformation; }