Show / Hide Table of Contents

Class IEventPublisherExtensions

Extension methods for Microsoft.XboxStudios.GameStateTracker.Events.IEventPublisher<T>

Inheritance
object
IEventPublisherExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.BotBrain.Devices
Assembly: BotBrain.Devices.dll
Syntax
public static class IEventPublisherExtensions

Methods

View Source

WaitForAsync<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.

  • View Source
In this article
Back to top Generated by DocFX