예제 #1
0
 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();
     }
 }
예제 #3
0
 public void Search(EntityInventoryCollection collection)
 {
     using (var wmi = new WMI <EntitySoftwareInventory>(new EntitySoftwareInventory()))
     {
         collection.Software = wmi.GetObjectList();
     }
 }
예제 #4
0
 public void Search(EntityInventoryCollection collection)
 {
     using (var wmi = new WMI <EntityPrinter>(new EntityPrinter()))
     {
         collection.Printers = wmi.GetObjectList();
     }
 }
예제 #5
0
 public void Search(EntityInventoryCollection collection)
 {
     using (var wmi = new WMI <EntityBiosInventory>(new EntityBiosInventory()))
     {
         collection.Bios = wmi.Execute();
     }
 }
예제 #6
0
 public void Search(EntityInventoryCollection collection)
 {
     using (var wmi = new WMI <EntityProcessorInventory>(new EntityProcessorInventory()))
     {
         collection.Processor = wmi.Execute();
     }
 }
예제 #7
0
        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();
            }
        }