Show / Hide Table of Contents

Class IBotWithEventsExtensions

Extension methods for IBotWithEvents.

Inheritance
object
IBotWithEventsExtensions
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
Assembly: BotBrain.Core.dll
Syntax
public static class IBotWithEventsExtensions

Methods

View Source

RunAction<T>(IBotWithEvents<T>, T, CancellationToken)

Runs an action and waits for it to finish.

Declaration
public static Task RunAction<T>(this IBotWithEvents<T> bot, T action, CancellationToken token = default)
Parameters
Type Name Description
IBotWithEvents<T> bot

The bot being extended.

T action

The action.

CancellationToken token

A token to monitor for cancellation.

Returns
Type Description
Task

A task.

Type Parameters
Name Description
T

The action type.

View Source

WaitForActionFinished(IBotWithEvents, Func<Task>?, CancellationToken)

Waits for an action to finish.

Declaration
public static Task WaitForActionFinished(this IBotWithEvents bot, Func<Task>? initialTask = null, CancellationToken token = default)
Parameters
Type Name Description
IBotWithEvents bot

The bot being extended.

Func<Task> initialTask

An optional task to run after registering the action finished events.

CancellationToken token

A token to monitor for cancellation.

Returns
Type Description
Task

A task.

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