public EventWaiter(Type eventClass, AshFrameHandler frameHandler)
 {
     _eventClass   = eventClass;
     _frameHandler = frameHandler;
     //Without RunContinuationsAsynchronously, calling SetResult can block the calling thread, because the continuation is run synchronously
     //see https://stackoverflow.com/a/37492081
     _tcs = new TaskCompletionSource <bool>(TaskCreationOptions.RunContinuationsAsynchronously);
 }
 public TransactionWaiter(IEzspTransaction ezspTransaction, AshFrameHandler frameHandler)
 {
     _ezspTransaction = ezspTransaction;
     _frameHandler    = frameHandler;
     //Without RunContinuationsAsynchronously, calling SetResult can block the calling thread, because the continuation is run synchronously
     //see https://stackoverflow.com/a/37492081
     _tcs = new TaskCompletionSource <bool>(TaskCreationOptions.RunContinuationsAsynchronously);
 }