Class SimpleAction
A test action which simply delays for the specified time.
Implements
Inherited Members
Namespace: Microsoft.XboxStudios.BotBrain.Samples.ClassBased
Assembly: BotBrain.Samples.dll
Syntax
[UsesParameter(new string[] { "Duration", "Type" })]
public class SimpleAction : TestAction, ICancellableOperation<TestAutomatedBot>, IOperation<TestAutomatedBot>, ICancellableOperation, IOperation, IHasParameters, IEquatable<TestAction>
Constructors
View SourceSimpleAction()
Initializes a new instance of the SimpleAction class.
Declaration
public SimpleAction()
Properties
View SourceDuration
Gets or sets the duration.
Declaration
public TimeSpan Duration { get; set; }
Property Value
Type | Description |
---|---|
TimeSpan |
Type
Gets or sets the action type.
Declaration
public TestBotActionType Type { get; set; }
Property Value
Type | Description |
---|---|
TestBotActionType |
Methods
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. |