Show / Hide Table of Contents

Class TestBotViewModel

A test bot.

Inheritance
object
BindableBase
ViewModelBase
BotViewModelBase
BotViewModel
BotWithQueueViewModel<TestAction>
BotWithPresetActionsViewModel<TestAutomatedBot, TestAction>
TestBotViewModel
Implements
IBotViewModelWithActions
IBotViewModel
INotifyPropertyChanged
IOnSelected
ICanMoveItemsTo
IDisposable
Inherited Members
BotWithPresetActionsViewModel<TestAutomatedBot, TestAction>.AvailableActionTypes
BotWithPresetActionsViewModel<TestAutomatedBot, TestAction>.InitializePresetActionsList(IEnumerable<ItemInfo>)
BotWithPresetActionsViewModel<TestAutomatedBot, TestAction>.CreateAction(TestAction)
BotWithPresetActionsViewModel<TestAutomatedBot, TestAction>.CreateActionWithInfo(ItemInfo)
BotWithPresetActionsViewModel<TestAutomatedBot, TestAction>.CreateActionFromExport(Type, string)
BotWithPresetActionsViewModel<TestAutomatedBot, TestAction>.CreateActionFromName(string)
BotWithQueueViewModel<TestAction>.CanResume
BotWithQueueViewModel<TestAction>.ResumeAsync()
BotWithQueueViewModel<TestAction>.SetupBot()
BotWithQueueViewModel<TestAction>.PushBotActions()
BotWithQueueViewModel<TestAction>.RegisterBotEvents()
BotWithQueueViewModel<TestAction>.DisposeBot(IAutomatedBot)
BotWithQueueViewModel<TestAction>.OnBotQueueStarted(object, EventArgs)
BotWithQueueViewModel<TestAction>.OnBotQueueStopped(object, EventArgs)
BotViewModel.Name
BotViewModel.IsRunning
BotViewModel.Status
BotViewModel.Actions
BotViewModel.SelectedAction
BotViewModel.Bot
BotViewModel.Device
BotViewModel.ListViewTitle
BotViewModel.StartAsync()
BotViewModel.StopAsync()
BotViewModel.IsRunningOn(IDevice)
BotViewModel.MoveItemsTo(object)
BotViewModel.CopyItemsTo(object)
BotViewModel.CanAppendItems(object)
BotViewModel.OnCanExecuteChanged()
BotViewModel.Dispose()
BotViewModel.DisposeBot()
BotViewModel.CheckAreActionsEditable()
BotViewModel.SetRunningAction(int)
BotViewModel.ClearRunningAction()
BotViewModel.SetRunningActions(IEnumerable<int>)
BotViewModel.OnBotActionStarted(object, BotActionEventArgs)
BotViewModel.OnBotActionFailed(object, BotActionFailedEventArgs)
BotViewModelBase.IsRunningChanged
BotViewModelBase.CanStart
BotViewModelBase.CanStop
BotViewModelBase.CanSave
BotViewModelBase.DetailsTitle
BotViewModelBase.ListViewContext
BotViewModelBase.AllListViewChoices
BotViewModelBase.ListDetailsTitle
BotViewModelBase.StartCommand
BotViewModelBase.StopCommand
BotViewModelBase.ResumeCommand
BotViewModelBase.SaveCommand
BotViewModelBase.ModifyListViewTitleIndexCommand
BotViewModelBase.FilePath
BotViewModelBase.DeviceManager
BotViewModelBase.TelemetryClient
BotViewModelBase.BotScriptTelemetryClient
BotViewModelBase.Save()
BotViewModelBase.OnDeviceSelected(DeviceCollectionChangeInfo)
BotViewModelBase.OnSelected(object)
BotViewModelBase.TryRunTask(string, Func<Task>)
ViewModelBase.Services
ViewModelBase.Logger
ViewModelBase.LogVerboseException(Exception, string, string)
BindableBase.SetProperty<T>(ref T, T, string)
BindableBase.SetProperty<T>(ref T, T, Action, string)
BindableBase.RaisePropertyChanged(string)
BindableBase.OnPropertyChanged(PropertyChangedEventArgs)
BindableBase.PropertyChanged
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Phoenix.TestBot
Assembly: Phoenix.Plugin.TestBot.dll
Syntax
public class TestBotViewModel : BotWithPresetActionsViewModel<TestAutomatedBot, TestAction>, IBotViewModelWithActions, IBotViewModel, INotifyPropertyChanged, IOnSelected, ICanMoveItemsTo, IDisposable

Constructors

View Source

TestBotViewModel(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 Source

CreateActionFromName(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
BotWithPresetActionsViewModel<TestAutomatedBot, TestAction>.CreateActionFromName(string)
Remarks

This demonstrates how to create custom UI when adding an action to a scripted bot in Phoenix.

View Source

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
BotWithPresetActionsViewModel<TestAutomatedBot, TestAction>.CreateActionWithInfo(ItemInfo)
View Source

CreateBot()

Creates a bot.

Declaration
protected override IAutomatedBot<TestAction> CreateBot()
Returns
Type Description
IAutomatedBot<TestAction>

The bot.

Overrides
BotWithQueueViewModel<TestAction>.CreateBot()
View Source

Load(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
BotViewModel.Load(string)
View Source

OnBotActionFinished(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
BotViewModel.OnBotActionFinished(object?, BotActionEventArgs)
View Source

SaveToString()

Saves the bot to a string.

Declaration
protected override string SaveToString()
Returns
Type Description
string

A string representation of the bot.

Overrides
BotViewModel.SaveToString()

Implements

IBotViewModelWithActions
IBotViewModel
INotifyPropertyChanged
IOnSelected
ICanMoveItemsTo
IDisposable

Extension Methods

INotifyPropertyChangedExtensions.OnPropertyChanged(INotifyPropertyChanged, string, Action)
INotifyPropertyChangedExtensions.OnPropertyChanged(INotifyPropertyChanged, string, Action<object?, string>)
INotifyPropertyChangedExtensions.OnPropertyChangedUntil(INotifyPropertyChanged, string, Func<bool>)
INotifyPropertyChangedExtensions.OnPropertyChangedUntil(INotifyPropertyChanged, string, Func<object?, string, bool>)
  • View Source
In this article
Back to top Generated by DocFX