MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / ReadAllAsync

Method ReadAllAsync

dotnet/src/webdriver/BiDi/EventStream.cs:64–78  ·  view source on GitHub ↗
([EnumeratorCancellation] CancellationToken cancellationToken = default)

Source from the content-addressed store, hash-verified

62 }
63
64 public async IAsyncEnumerable<TEventArgs> ReadAllAsync([EnumeratorCancellation] CancellationToken cancellationToken = default)
65 {
66 if (_disposed != 0) throw new ObjectDisposedException(GetType().FullName);
67
68 while (await _channel.Reader.WaitToReadAsync(cancellationToken).ConfigureAwait(false))
69 {
70 while (_channel.Reader.TryRead(out var item))
71 {
72 // Spans the consumer's own processing of this item: Dispose() only runs once they resume past this yield.
73 using var activity = SeleniumActivitySource.Instance.StartActivity(item.Method, ActivityKind.Consumer);
74
75 yield return item.Args;
76 }
77 }
78 }
79
80 public async ValueTask DisposeAsync()
81 {

Calls

no outgoing calls