public BackgroundInventory(int parallelTasksCount, Dictionary <string, object> plugins)
 {
     if (plugins == null)
     {
         throw new ArgumentNullException(nameof(plugins));
     }
     this.scheduler = new QueuedTaskScheduler <SolarWinds.Orion.Core.BusinessLayer.BackgroundInventory.BackgroundInventory.InventoryTask>(new QueuedTaskScheduler <SolarWinds.Orion.Core.BusinessLayer.BackgroundInventory.BackgroundInventory.InventoryTask> .TaskProcessingRoutine(this.DoInventory), parallelTasksCount);
     this.scheduler.TaskProcessingFinished += new EventHandler(this.scheduler_TaskProcessingFinished);
     this.snmpGlobals = new SnmpGlobalSettings();
     this.snmpGlobals.set_MaxReplies(SettingsDAL.GetCurrentInt("SWNetPerfMon-Settings-SNMP MaxReps", 5));
     this.snmpGlobals.set_RequestTimeout(SettingsDAL.GetCurrentInt("SWNetPerfMon-Settings-SNMP Timeout", 2500));
     this.snmpGlobals.set_RequestRetries(SettingsDAL.GetCurrentInt("SWNetPerfMon-Settings-SNMP Retries", 2));
     this.snmpGlobals.set_HsrpEnabled((bool)SettingsDAL.GetCurrent <bool>("SWNetPerfMon-Settings-SNMP HSRPEnabled", (M0)1));
     this.wmiGlobals = new WmiGlobalSettings();
     this.wmiGlobals.set_UserImpersonationLevel((ImpersonationLevel)SettingsDAL.GetCurrent <ImpersonationLevel>("SWNetPerfMon-Settings-Wmi UserImpersonationLevel", (M0)0));
     this.wmiGlobals.set_ConnectionRationMode((WmiConnectionRationMode)SettingsDAL.GetCurrent <WmiConnectionRationMode>("SWNetPerfMon-Settings-Wmi ConnectionRationMode", (M0)1));
     this.wmiGlobals.set_MaxRationedConnections(SettingsDAL.GetCurrentInt("SWNetPerfMon-Settings-Wmi MaxRationedConnections", 0));
     this.wmiGlobals.set_KillProcessExcessiveError((bool)SettingsDAL.GetCurrent <bool>("SWNetPerfMon-Settings-Wmi KillProcessExcessiveError", (M0)1));
     this.wmiGlobals.set_ExcessiveErrorThreshhold(SettingsDAL.GetCurrentInt("SWNetPerfMon-Settings-Wmi ExcessiveErrorThreshhold", 50));
     this.wmiGlobals.set_WmiRetries(SettingsDAL.GetCurrentInt("SWNetPerfMon-Settings-WMI Retries", 0));
     this.wmiGlobals.set_WmiRetryInterval(SettingsDAL.GetCurrentInt("SWNetPerfMon-Settings-WMI Retry Interval", 0));
     this.wmiGlobals.set_WmiAutoCorrectRDNSInconsistency(Convert.ToBoolean(SettingsDAL.GetCurrentInt("SWNetPerfMon-Settings-WMI Auto Correct Reverse DNS", 0)));
     this.wmiGlobals.set_WmiDefaultRootNamespaceOverrideIndex(SettingsDAL.GetCurrentInt("SWNetPerfMon-Settings-WMI Default Root Namespace Override Index", 0));
     this.inventories = plugins;
 }
Beispiel #2
0
 public BackgroundInventoryManager(int parallelTasksCount)
 {
     this.scheduler = new QueuedTaskScheduler <BackgroundInventoryManager.InventoryTask>(new QueuedTaskScheduler <BackgroundInventoryManager.InventoryTask> .TaskProcessingRoutine(this.DoInventory), parallelTasksCount);
     this.scheduler.TaskProcessingFinished += new EventHandler(this.scheduler_TaskProcessingFinished);
     this.globals = new SnmpGlobalSettings();
     this.globals.set_MaxReplies(SettingsDAL.GetCurrentInt("SWNetPerfMon-Settings-SNMP MaxReps", 5));
     this.globals.set_RequestTimeout(SettingsDAL.GetCurrentInt("SWNetPerfMon-Settings-SNMP Timeout", 2500));
     this.globals.set_RequestRetries(SettingsDAL.GetCurrentInt("SWNetPerfMon-Settings-SNMP Retries", 2));
     this.globals.set_HsrpEnabled((bool)SettingsDAL.GetCurrent <bool>("SWNetPerfMon-Settings-SNMP HSRPEnabled", (M0)1));
     this.inventories = new Dictionary <string, BackgroundInventoryManager.DoInventoryDelegate>((IEqualityComparer <string>)StringComparer.OrdinalIgnoreCase);
     this.inventories.Add("Cpu", new BackgroundInventoryManager.DoInventoryDelegate(this.DoCpuInventory));
     this.inventories.Add("Memory", new BackgroundInventoryManager.DoInventoryDelegate(this.DoMemoryInventory));
 }