Show / Hide Table of Contents

Class OvermindActionDelegate

A bot action that runs a delegate.

Inheritance
object
CancellableOperationBase<OvermindBot>
OvermindAction
OvermindActionDelegate
Implements
ICancellableOperation<OvermindBot>
IOperation<OvermindBot>
ICancellableOperation
IOperation
Inherited Members
OvermindAction.Name
OvermindAction.ToString()
CancellableOperationBase<OvermindBot>.ExecutionStateChanged
CancellableOperationBase<OvermindBot>.IsRunning
CancellableOperationBase<OvermindBot>.Timeout
CancellableOperationBase<OvermindBot>.GetAwaiter(OvermindBot, CancellationToken)
CancellableOperationBase<OvermindBot>.Run(OvermindBot)
CancellableOperationBase<OvermindBot>.Run(OvermindBot, CancellationToken)
CancellableOperationBase<OvermindBot>.IsRunningOn(OvermindBot)
CancellableOperationBase<OvermindBot>.Cancel(OvermindBot)
CancellableOperationBase<OvermindBot>.Cancel(OvermindBot, bool)
CancellableOperationBase<OvermindBot>.TryCreateCancellationToken(OvermindBot, out CancellationToken)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Microsoft.XboxStudios.BotBrain.Overmind
Assembly: BotBrain.Overmind.dll
Syntax
public class OvermindActionDelegate : OvermindAction, ICancellableOperation<OvermindBot>, IOperation<OvermindBot>, ICancellableOperation, IOperation
Remarks

Initializes a new instance of the OvermindActionDelegate class.

Constructors

View Source

OvermindActionDelegate(string, Func<OvermindBot, CancellationToken, Task<bool>>, params IDevice[])

A bot action that runs a delegate.

Declaration
public OvermindActionDelegate(string name, Func<OvermindBot, CancellationToken, Task<bool>> run, params IDevice[] targets)
Parameters
Type Name Description
string name

The action name.

Func<OvermindBot, CancellationToken, Task<bool>> run

The delegate to run.

IDevice[] targets

The devices to target.

Remarks

Initializes a new instance of the OvermindActionDelegate class.

Properties

View Source

Targets

Gets an enumeration of devices to apply this action to.

Declaration
public override IEnumerable<IDevice> Targets { get; }
Property Value
Type Description
IEnumerable<IDevice>
Overrides
OvermindAction.Targets

Methods

View Source

ExecuteOn(OvermindBot, CancellationToken)

Runs the operation on an item.

Declaration
protected override Task<bool> ExecuteOn(OvermindBot item, CancellationToken token)
Parameters
Type Name Description
OvermindBot item

The item.

CancellationToken token

A token to monitor for cancellation.

Returns
Type Description
Task<bool>

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

Overrides
CancellableOperationBase<OvermindBot>.ExecuteOn(OvermindBot, CancellationToken)

Implements

ICancellableOperation<T>
IOperation<T>
ICancellableOperation
IOperation
  • View Source
In this article
Back to top Generated by DocFX