Show / Hide Table of Contents

Interface ICancellableOperation<T>

Represents a cancelable operation.

Inherited Members
IOperation<T>.Run(T)
IOperation<T>.IsRunningOn(T)
IOperation<T>.GetAwaiter(T, CancellationToken)
IOperation.IsRunning
Namespace: Microsoft.XboxStudios.BotBrain.Operations
Assembly: BotBrain.Operations.dll
Syntax
public interface ICancellableOperation<T> : IOperation<T>, ICancellableOperation, IOperation
Type Parameters
Name Description
T

A context to run the operation in.

Methods

View Source

Cancel(T)

Cancels an operations running on a specific item.

Declaration
void Cancel(T item)
Parameters
Type Name Description
T item

The item.

View Source

Run(T, CancellationToken)

Runs the operation on an item.

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

The item.

CancellationToken token

A token to cancel the operation.

Returns
Type Description
Task<bool>

A task that returns a boolean indicating success or failure when the operation completes.

Extension Methods

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