コード例 #1
0
        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);
        }
コード例 #2
0
 private void Terminate(PlaywrightSharpException ex) => _terminationTaskWrapper.TrySetException(ex);