WaitForEventAsync(string, Func<DiagnosticEvent, bool>, TimeSpan, CancellationToken)
public Task<DiagnosticEvent> WaitForEventAsync(string eventName, Func<DiagnosticEvent, bool> predicate, TimeSpan timeout, CancellationToken cancellationToken = default(CancellationToken)) Waits for an event with the specified name that matches a predicate.
Parameters
eventNamestring- The name of the event to wait for.
predicateFunc<DiagnosticEvent, bool>- A predicate to match the event payload.
timeoutTimeSpan- The maximum time to wait.
cancellationTokenCancellationToken- A cancellation token.
Returns
The captured event.
