public static HotFixes[] FillHotFixes(string machineName, string userName, string password, string queryArea) { InitializeScope(machineName, userName, password); ManagementClass managementClass = new ManagementClass(path + ":" + queryArea); if (mScope != null) { managementClass.Scope = mScope; } ManagementObjectCollection instances = managementClass.GetInstances(); if (instances == null) { return(null); } HotFixes[] hotfixesInstalled = new HotFixes[instances.Count]; ManagementObjectCollection.ManagementObjectEnumerator enumerator = instances.GetEnumerator(); int i = 0; while (enumerator.MoveNext()) { hotfixesInstalled[i] = new HotFixes((ManagementObject)enumerator.Current); i++; } return(hotfixesInstalled); }
public static HotFixes[] FillHotFixes(string machineName, string userName, string password, string queryArea) { InitializeScope(machineName, userName, password); ManagementClass managementClass = new ManagementClass(path + ":" + queryArea); if (mScope != null) { managementClass.Scope = mScope; } ManagementObjectCollection instances = managementClass.GetInstances(); if (instances == null) { return null; } HotFixes[] hotfixesInstalled = new HotFixes[instances.Count]; ManagementObjectCollection.ManagementObjectEnumerator enumerator = instances.GetEnumerator(); int i = 0; while (enumerator.MoveNext()) { hotfixesInstalled[i] = new HotFixes((ManagementObject) enumerator.Current); i++; } return hotfixesInstalled; }