Class IEventPublisherExtensions
Extension methods for Microsoft.XboxStudios.GameStateTracker.Events.IEventPublisher<T>
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Devices
Assembly: BotBrain.Devices.dll
Syntax
public static class IEventPublisherExtensions
Methods
View SourceWaitForAsync<T>(IEventPublisher<T>, Func<T, bool>?, CancellationToken)
Waits for an event to be published.
Declaration
public static Task<T> WaitForAsync<T>(this IEventPublisher<T> self, Func<T, bool>? predicate = null, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
IEventPublisher<T> | self | The event publisher being extended. |
Func<T, bool> | predicate | The event predicate to match. |
CancellationToken | token | A token to monitor for cancellation. |
Returns
Type | Description |
---|---|
Task<T> | A task containing the event. |
Type Parameters
Name | Description |
---|---|
T | The event type. |