# DiagnosticEventCollector.CreateEventAwaiter(string)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.diagnostics.diagnosticeventcollector/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.diagnostics.diagnosticeventcollector/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/Diagnostics/DiagnosticEventCollector.cs#L168)

```csharp
public TaskCompletionSource<DiagnosticEvent> CreateEventAwaiter(string eventName)
```

Creates a task that completes when the specified event is captured. Unlike WaitForEventAsync, this does not check for existing events.

### Parameters

- `eventName` (`string`): The name of the event to wait for.

### Returns

A task completion source that will be completed when the event is captured.
