Show / Hide Table of Contents

Class TestAction

A class-based test bot action.

Inheritance
object
CancellableOperationBase<TestAutomatedBot>
TestAction
LaunchGameAction
NotImplementedAction
SimpleAction
TestPhoenixAction
Implements
ICancellableOperation<TestAutomatedBot>
IOperation<TestAutomatedBot>
ICancellableOperation
IOperation
IHasParameters
IEquatable<TestAction>
Inherited Members
CancellableOperationBase<TestAutomatedBot>.ExecutionStateChanged
CancellableOperationBase<TestAutomatedBot>.IsRunning
CancellableOperationBase<TestAutomatedBot>.Timeout
CancellableOperationBase<TestAutomatedBot>.GetAwaiter(TestAutomatedBot, CancellationToken)
CancellableOperationBase<TestAutomatedBot>.Run(TestAutomatedBot)
CancellableOperationBase<TestAutomatedBot>.Run(TestAutomatedBot, CancellationToken)
CancellableOperationBase<TestAutomatedBot>.IsRunningOn(TestAutomatedBot)
CancellableOperationBase<TestAutomatedBot>.Cancel(TestAutomatedBot)
CancellableOperationBase<TestAutomatedBot>.Cancel(TestAutomatedBot, bool)
CancellableOperationBase<TestAutomatedBot>.TryCreateCancellationToken(TestAutomatedBot, out CancellationToken)
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Microsoft.XboxStudios.BotBrain.Samples.ClassBased
Assembly: BotBrain.Samples.dll
Syntax
[UsesParameter(new string[] { "Name" })]
public class TestAction : CancellableOperationBase<TestAutomatedBot>, ICancellableOperation<TestAutomatedBot>, IOperation<TestAutomatedBot>, ICancellableOperation, IOperation, IHasParameters, IEquatable<TestAction>

Constructors

View Source

TestAction()

Initializes a new instance of the TestAction class.

Declaration
public TestAction()

Properties

View Source

IsSuccessful

Gets or sets a value indicating whether or not the action executed successfully.

Declaration
public bool IsSuccessful { get; protected set; }
Property Value
Type Description
bool
View Source

Name

Gets or sets the action name.

Declaration
public string Name { get; set; }
Property Value
Type Description
string
View Source

Parameters

Gets or sets the action parameters.

Declaration
[JsonIgnore]
public IParameterManager Parameters { get; set; }
Property Value
Type Description
IParameterManager

Methods

View Source

Equals(TestAction?)

Indicates whether the current object is equal to another object of the same type.

Declaration
public virtual bool Equals(TestAction? other)
Parameters
Type Name Description
TestAction other

An object to compare with this object.

Returns
Type Description
bool

true if the current object is equal to the other parameter; otherwise, false.

View Source

Equals(object?)

Determines whether the specified object is equal to the current object.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
object obj

The object to compare with the current object.

Returns
Type Description
bool

true if the specified object is equal to the current object; otherwise, false.

Overrides
object.Equals(object)
View Source

ExecuteOn(TestAutomatedBot, CancellationToken)

Runs the operation on an item.

Declaration
protected override Task<bool> ExecuteOn(TestAutomatedBot item, CancellationToken token)
Parameters
Type Name Description
TestAutomatedBot 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<TestAutomatedBot>.ExecuteOn(TestAutomatedBot, CancellationToken)
View Source

GetHashCode()

Serves as the default hash function.

Declaration
public override int GetHashCode()
Returns
Type Description
int

A hash code for the current object.

Overrides
object.GetHashCode()
View Source

ToString()

Returns a string that represents the current object.

Declaration
public override string ToString()
Returns
Type Description
string

A string that represents the current object.

Overrides
object.ToString()

Implements

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