Interface IOperation<T>
Represents a simple operation.
Inherited Members
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 SourceGetAwaiter(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. |
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. |
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. |