public DataCollector(DataCollectorContext context) { Context = context; m_lock = new object(); m_log = LogManager.GetLogger(typeof(DataCollector)); }
public static Data Create(DataCollectorContext context, string value) { ListData <PingResult> d = new ListData <PingResult>(context); var definition = new { Value = new List <PingResult>() }; var data = JsonConvert.DeserializeAnonymousType(value, definition); if (data != null) { d.Data.AddRange(data.Value); } return(d); }
public CollectedData(DataCollectorContext context, bool collected, Data d = null) { Context = context; DataIsCollected = collected; if (d == null) { D = new List <Data>(); } else { D = new List <Data>(new Data[] { d }); } }
public GenericData(DataCollectorContext context, T t) : base(context) { Generic = t; }
public Data(DataCollectorContext context) { Context = context; m_value = string.Empty; CollectedAt = DateTimeOffset.Now; }
public CollectedData(DataCollectorContext context, bool collected, IEnumerable <Data> datalist) { Context = context; DataIsCollected = collected; D = new List <Data>(datalist); }
public DictionaryData(DataCollectorContext context) : base(context) { }
public GenericDictionaryData(DataCollectorContext context) : base(context) { Data = new Dictionary <string, T>(); }
public ListStringData(DataCollectorContext context, Options options) : base(context) { m_options = options; }
public ListData(DataCollectorContext context) : base(context) { Data = new List <T>(); }
public static Data Create(DataCollectorContext context, string value) { Data d = null; switch (context.Type) { case ECollectorType.Memory: d = MemoryUsageCollector.Create(context, value); break; case ECollectorType.Disk: d = DiskUsageCollector.Create(context, value); break; case ECollectorType.CPUUsage: d = CPUUsageCollector.Create(context, value); break; case ECollectorType.NICUsage: d = NICUsageCollector.Create(context, value); break; case ECollectorType.Uptime: d = UptimeCollector.Create(context, value); break; case ECollectorType.LastBootTime: d = LastBootTimeCollector.Create(context, value); break; case ECollectorType.Processes: d = ProcessesCollector.Create(context, value); break; case ECollectorType.Ping: d = PingCollector.Create(context, value); break; case ECollectorType.InstalledApplications: d = ApplicationsCollector.Create(context, value); break; case ECollectorType.Services: d = ServicesCollector.Create(context, value); break; case ECollectorType.SystemErrors: d = EventLogCollector.Create(context, value); break; case ECollectorType.ApplicationErrors: d = EventLogCollector.Create(context, value); break; case ECollectorType.DatabaseSize: d = DatabaseSizeCollector.Create(context, value); break; case ECollectorType.UPS: d = UPSCollector.Create(context, value); break; case ECollectorType.DiskSpeed: d = DiskSpeedCollector.Create(context, value); break; case ECollectorType.Configuration: break; case ECollectorType.SMART: break; //case CollectorType.AntiVirus: //case CollectorType.Firewall: case ECollectorType.Unknown: default: break; } return(d); }