Clear
public void Clear() Clears all captured events.
System.Diagnostics.DiagnosticListener.AllListeners and captures events from listeners matching specified patterns. public void Clear()public TaskCompletionSource<DiagnosticEvent> CreateEventAwaiter(string eventName)eventNamestringpublic void Dispose()public int GetEventCount(string eventName)eventNamestringpublic IEnumerable<DiagnosticEvent> GetEvents(string eventName)eventNamestringpublic Task<DiagnosticEvent> WaitForEventAsync(string eventName, Func<DiagnosticEvent, bool> predicate, TimeSpan timeout, CancellationToken cancellationToken = default(CancellationToken))eventNamestringpredicateFunc<DiagnosticEvent, bool>timeoutTimeSpancancellationTokenCancellationTokenpublic Task<DiagnosticEvent> WaitForEventAsync(string eventName, TimeSpan timeout, CancellationToken cancellationToken = default(CancellationToken))eventNamestringtimeoutTimeSpancancellationTokenCancellationTokenSystem.TimeoutExceptionpublic Task<IReadOnlyList<DiagnosticEvent>> WaitForEventCountAsync(string eventName, int expectedCount, TimeSpan timeout, CancellationToken cancellationToken = default(CancellationToken))eventNamestringexpectedCountinttimeoutTimeSpancancellationTokenCancellationTokenSystem.TimeoutException