public AsyncManualResetEvent(bool isSet = false) { _tcs = new TaskCompletionSource<bool>(); if (isSet) { _tcs.SetResult(true); } }