<PackageReference Include="NUnit" Version="3.0.0-rc" />

EventQueue

public class EventQueue
Implements a queue of work items each of which is queued as a WaitCallback.
public int Count { get; }

Gets the count of items in the queue.

public EventQueue()

Construct a new EventQueue

public Event Dequeue(bool blockWhenEmpty)

Removes the first element from the queue and returns it (or null).

public void Enqueue(Event e)

Enqueues the specified event

public void SetWaitHandleForSynchronizedEvents(AutoResetEvent synchronousEventWaitHandle)

Sets a handle on which to wait, when Enqueue is called for an Event with IsSynchronous == true.

public void Stop()

Stop processing of the queue