예제 #1
0
 public static void Fire(string deviceName, bool ready)
 {
     if (WmiProvider.Instance.EnableEvents)
     {
         Instrumentation.Fire(new WmiOnReadynessChangedEvent(deviceName, ready));
     }
 }
예제 #2
0
 public static void Fire(string hwid)
 {
     if (WmiProvider.Instance.EnableEvents)
     {
         Instrumentation.Fire(new WmiOnStateChangedEvent(hwid));
     }
 }
예제 #3
0
        public static void Main(string[] args)
        {
            MyManagementEvent ev = new MyManagementEvent();

            ev.Description = "SAMPLE MANAGEMENT EVENT";
            ev.EventNo     = 256;
            Instrumentation.Fire(ev);
            Console.ReadLine();
        }
예제 #4
0
        public static void Main()
        {
            MyEvent e = new MyEvent();

            e.setEventName("Hello");

            // Fire a management event
            Instrumentation.Fire(e);
            return;
        }
예제 #5
0
        /// <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);
            }
        }
예제 #6
0
        /// <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);
        }