Class TestAction
A class-based test bot action.
Inheritance
Implements
Inherited Members
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 SourceTestAction()
Initializes a new instance of the TestAction class.
Declaration
public TestAction()
Properties
View SourceIsSuccessful
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 |
Name
Gets or sets the action name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Parameters
Gets or sets the action parameters.
Declaration
[JsonIgnore]
public IParameterManager Parameters { get; set; }
Property Value
Type | Description |
---|---|
IParameterManager |
Methods
View SourceEquals(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 |
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
View SourceExecuteOn(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
View SourceGetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
View SourceToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |