internal void RejectOnEvent <T>( object eventSource, string e, PlaywrightSharpException navigationException, Func <T, bool> predicate = null) { if (eventSource == null) { return; } var(task, dispose) = WaitForEvent <T>(eventSource, e, predicate); RejectOn( task.ContinueWith(t => throw navigationException, _cts.Token, TaskContinuationOptions.RunContinuationsAsynchronously, TaskScheduler.Current), dispose); }
private void Terminate(PlaywrightSharpException ex) => _terminationTaskWrapper.TrySetException(ex);