/// <summary> /// Unregister all event listeners /// </summary> public void UnregisterAllAutomationEventListners() { var msg = new EventListenerFactoryMessage() { MessageType = EventListenerFactoryMessageType.UnregisterAllEventListeners, }; AddMessageToQueue(msg); msg.WaitForProcessed(2000);// expect to be done in 2 seconds. }
/// <summary> /// Unregister a automation event listener /// </summary> /// <param name="eventId"></param> /// <param name="wait">wait to complete</param> public void UnregisterAutomationEventListener(int eventId, bool wait = false) { var msg = new EventListenerFactoryMessage() { MessageType = EventListenerFactoryMessageType.UnregisterEventListener, EventId = eventId }; AddMessageToQueue(msg); if (wait) { msg.WaitForProcessed(2000);// expect to be done in 2 seconds. } }