Class BotWithQueueViewModel<T>
The view model for a bot with a queue of actions which can be started from any index.
Inheritance
BotWithQueueViewModel<T>
Implements
Inherited Members
Namespace: Phoenix.BotBrain
Assembly: Phoenix.Plugin.BotBrain.BotScripting.dll
Syntax
public abstract class BotWithQueueViewModel<T> : BotViewModel, IBotViewModelWithActions, IBotViewModel, INotifyPropertyChanged, IOnSelected, ICanMoveItemsTo, IDisposable
Type Parameters
Name | Description |
---|---|
T | The type of actions the bot supports. |
Constructors
View SourceBotWithQueueViewModel(IServiceProvider)
Initializes a new instance of the BotWithQueueViewModel<T> class.
Declaration
public BotWithQueueViewModel(IServiceProvider services)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | services | The service provider. |
Properties
View SourceCanResume
Gets a value indicating whether or not the bot can be resumed.
Declaration
public override bool CanResume { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Methods
View SourceCreateBot()
Creates a bot.
Declaration
protected abstract IAutomatedBot<T> CreateBot()
Returns
Type | Description |
---|---|
IAutomatedBot<T> | The bot. |
DisposeBot(IAutomatedBot)
Disposes the bot.
Declaration
protected override void DisposeBot(IAutomatedBot bot)
Parameters
Type | Name | Description |
---|---|---|
IAutomatedBot | bot | The bot. |
Overrides
View SourceOnBotQueueStarted(object?, EventArgs)
Called when a bot queue starts.
Declaration
protected virtual void OnBotQueueStarted(object? sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
object | sender | The sender. |
EventArgs | e | Not used. |
OnBotQueueStopped(object?, EventArgs)
Called when a bot queue finishes.
Declaration
protected virtual void OnBotQueueStopped(object? sender, EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
object | sender | The sender. |
EventArgs | e | Not used. |
PushBotActions()
Pushes the queued actions from the UI to the underlying bot.
Declaration
protected virtual Task PushBotActions()
Returns
Type | Description |
---|---|
Task | A task. |
RegisterBotEvents()
Registers bot events.
Declaration
protected override void RegisterBotEvents()
Overrides
View SourceResumeAsync()
Resumes the bot.
Declaration
public override Task ResumeAsync()
Returns
Type | Description |
---|---|
Task | A task. |
Overrides
View SourceSetupBot()
Sets up the bot in order to start it.
Declaration
protected override Task SetupBot()
Returns
Type | Description |
---|---|
Task | A task. |