Show / Hide Table of Contents

Interface IOperation<T>

Represents a simple operation.

Inherited Members
IOperation.IsRunning
Namespace: Microsoft.XboxStudios.BotBrain.Operations
Assembly: BotBrain.Operations.dll
Syntax
public interface IOperation<T> : IOperation
Type Parameters
Name Description
T

A context to run the operation in.

Methods

View Source

GetAwaiter(T, CancellationToken)

Gets a task used to await this operation on an item.

Declaration
Task<bool> GetAwaiter(T item, CancellationToken token)
Parameters
Type Name Description
T item

The item to use.

CancellationToken token

A token to monitor for cancellation.

Returns
Type Description
Task<bool>

A task.

View Source

IsRunningOn(T)

Gets a value indicating whether or not the operation is running on an item.

Declaration
bool IsRunningOn(T item)
Parameters
Type Name Description
T item

The item to use.

Returns
Type Description
bool

True if the operation is running on the item.

View Source

Run(T)

Runs the operation on an item.

Declaration
Task<bool> Run(T item)
Parameters
Type Name Description
T item

The item.

Returns
Type Description
Task<bool>

A task that returns when the operation completes.

Extension Methods

IOperationExtensions.Run<T>(IOperation<T>, IEnumerable<T>)
  • View Source
In this article
Back to top Generated by DocFX