Class TestBotViewModel
A test bot.
Inheritance
TestBotViewModel
Implements
Inherited Members
Namespace: Phoenix.TestBot
Assembly: Phoenix.Plugin.TestBot.dll
Syntax
public class TestBotViewModel : BotWithPresetActionsViewModel<TestAutomatedBot, TestAction>, IBotViewModelWithActions, IBotViewModel, INotifyPropertyChanged, IOnSelected, ICanMoveItemsTo, IDisposable
Constructors
View SourceTestBotViewModel(IServiceProvider)
Initializes a new instance of the TestBotViewModel class.
Declaration
public TestBotViewModel(IServiceProvider services)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | services | The service provider. |
Methods
View SourceCreateActionFromName(string)
Creates a bot action view model using the specified contract name.
Declaration
protected override IBotActionViewModel CreateActionFromName(string contractName)
Parameters
Type | Name | Description |
---|---|---|
string | contractName | The contract name. |
Returns
Type | Description |
---|---|
IBotActionViewModel | The bot action view model. |
Overrides
Remarks
This demonstrates how to create custom UI when adding an action to a scripted bot in Phoenix.
CreateActionWithInfo(ItemInfo)
Creates a bot action view model with the specified name.
Declaration
protected override IBotActionViewModel CreateActionWithInfo(ItemInfo info)
Parameters
Type | Name | Description |
---|---|---|
ItemInfo | info | The action name. |
Returns
Type | Description |
---|---|
IBotActionViewModel | The bot action view model. |
Overrides
View SourceCreateBot()
Creates a bot.
Declaration
protected override IAutomatedBot<TestAction> CreateBot()
Returns
Type | Description |
---|---|
IAutomatedBot<TestAction> | The bot. |
Overrides
View SourceLoad(string)
Loads a serialized representation of a bot.
Declaration
public override void Load(string data)
Parameters
Type | Name | Description |
---|---|---|
string | data | The data to load. |
Overrides
View SourceOnBotActionFinished(object?, BotActionEventArgs)
Called when a bot action finishes.
Declaration
protected override void OnBotActionFinished(object? sender, BotActionEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
object | sender | The sender. |
BotActionEventArgs | e | Not used. |
Overrides
View SourceSaveToString()
Saves the bot to a string.
Declaration
protected override string SaveToString()
Returns
Type | Description |
---|---|
string | A string representation of the bot. |