public static void Fire(string deviceName, bool ready) { if (WmiProvider.Instance.EnableEvents) { Instrumentation.Fire(new WmiOnReadynessChangedEvent(deviceName, ready)); } }
public static void Fire(string hwid) { if (WmiProvider.Instance.EnableEvents) { Instrumentation.Fire(new WmiOnStateChangedEvent(hwid)); } }
public static void Main(string[] args) { MyManagementEvent ev = new MyManagementEvent(); ev.Description = "SAMPLE MANAGEMENT EVENT"; ev.EventNo = 256; Instrumentation.Fire(ev); Console.ReadLine(); }
public static void Main() { MyEvent e = new MyEvent(); e.setEventName("Hello"); // Fire a management event Instrumentation.Fire(e); return; }
/// <summary> /// Create and fire event /// </summary> public static void SendMonitorEvent(EventLog eventLog, string message, EventLogEntryType eventType, int eventID) { SenderMonitorEvent MonitorEvent = new SenderMonitorEvent(eventLog, message, eventType, eventID); try { Instrumentation.Fire(MonitorEvent); } catch //(Exception ex) { //new SenderMonitorEvent(eventLog, ex.ToString(), EventLogEntryType.Error); } }
/// <summary> /// Create and fire event /// </summary> public static void sendMonitorEvent(EventLog eventLog, string message, EventLogEntryType eventType) { SenderMonitorEvent MonitorEvent = new SenderMonitorEvent(eventLog, message, eventType); Instrumentation.Fire(MonitorEvent); }