WaitForEventCountAsync(string, int, TimeSpan, CancellationToken)
public Task<IReadOnlyList<DiagnosticEvent>> WaitForEventCountAsync(string eventName, int expectedCount, TimeSpan timeout, CancellationToken cancellationToken = default(CancellationToken)) Waits until at least the specified number of events with the given name have been captured.
Parameters
eventNamestring- The name of the event to count.
expectedCountint- The minimum number of events expected.
timeoutTimeSpan- The maximum time to wait.
cancellationTokenCancellationToken- A cancellation token.
Returns
All captured events with the specified name.
Exceptions
System.TimeoutException- Thrown if the expected count is not reached within the timeout.
