public void Search(EntityInventoryCollection collection) { using (var wmi = new WMI <EntityHardDrive>(new EntityHardDrive())) { collection.HardDrives = wmi.GetObjectList(); } }
public void Search(EntityInventoryCollection collection) { using (var wmi = new WMI <EntityComputerSystemInventory>(new EntityComputerSystemInventory())) { collection.ComputerSystem = wmi.Execute(); } }
public void Search(EntityInventoryCollection collection) { using (var wmi = new WMI <EntitySoftwareInventory>(new EntitySoftwareInventory())) { collection.Software = wmi.GetObjectList(); } }
public void Search(EntityInventoryCollection collection) { using (var wmi = new WMI <EntityPrinter>(new EntityPrinter())) { collection.Printers = wmi.GetObjectList(); } }
public void Search(EntityInventoryCollection collection) { using (var wmi = new WMI <EntityBiosInventory>(new EntityBiosInventory())) { collection.Bios = wmi.Execute(); } }
public void Search(EntityInventoryCollection collection) { using (var wmi = new WMI <EntityProcessorInventory>(new EntityProcessorInventory())) { collection.Processor = wmi.Execute(); } }
public void Run(DtoInventoryModule module) { Logger.Info("Running Inventory Module"); var collection = new EntityInventoryCollection(); var instances = from t in Assembly.GetExecutingAssembly().GetTypes() where t.GetInterfaces().Contains(typeof(IInventorySearcher)) && t.GetConstructor(Type.EmptyTypes) != null select Activator.CreateInstance(t) as IInventorySearcher; foreach (var instance in instances) { instance.Search(collection); //Thread thread = new Thread(() => instance.Search(collection)); //thread.Start(); } }