Class BotWithPresetActionsViewModel<TBot, T>
The view model for a bot with a preset list of actions which can be created.
Inheritance
Implements
Inherited Members
Namespace: Phoenix.BotBrain
Assembly: Phoenix.Plugin.BotBrain.BotScripting.dll
Syntax
public abstract class BotWithPresetActionsViewModel<TBot, T> : BotWithQueueViewModel<T>, IBotViewModelWithActions, IBotViewModel, INotifyPropertyChanged, IOnSelected, ICanMoveItemsTo, IDisposable
Type Parameters
Name | Description |
---|---|
TBot | The bot type. |
T | The type of actions the bot supports. |
Remarks
Initializes a new instance of the BotWithPresetActionsViewModel<TBot, T> class.
Constructors
View SourceBotWithPresetActionsViewModel(IServiceProvider)
The view model for a bot with a preset list of actions which can be created.
Declaration
protected BotWithPresetActionsViewModel(IServiceProvider services)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | services | The service provider. |
Remarks
Initializes a new instance of the BotWithPresetActionsViewModel<TBot, T> class.
Properties
View SourceAvailableActionTypes
Gets the action types which can be created.
Declaration
public ICollectionView? AvailableActionTypes { get; }
Property Value
Type | Description |
---|---|
ICollectionView |
Methods
View SourceCreateAction(T)
Creates a bot action view model for the given action.
Declaration
protected virtual IBotActionViewModel CreateAction(T action)
Parameters
Type | Name | Description |
---|---|---|
T | action | The bot action. |
Returns
Type | Description |
---|---|
IBotActionViewModel | The bot action view model. |
CreateActionFromExport(Type, string)
Creates a bot action view model using the specified contract type and name.
Declaration
protected virtual IBotActionViewModel CreateActionFromExport(Type contractType, string contractName)
Parameters
Type | Name | Description |
---|---|---|
Type | contractType | The contract type. |
string | contractName | The contract name. |
Returns
Type | Description |
---|---|
IBotActionViewModel | The bot action view model. |
CreateActionFromName(string)
Creates a bot action view model using the specified contract name.
Declaration
protected virtual IBotActionViewModel CreateActionFromName(string contractName)
Parameters
Type | Name | Description |
---|---|---|
string | contractName | The contract name. |
Returns
Type | Description |
---|---|
IBotActionViewModel | The bot action view model. |
CreateActionWithInfo(ItemInfo)
Creates a bot action view model with the specified name.
Declaration
protected virtual IBotActionViewModel CreateActionWithInfo(ItemInfo info)
Parameters
Type | Name | Description |
---|---|---|
ItemInfo | info | The action name. |
Returns
Type | Description |
---|---|
IBotActionViewModel | The bot action view model. |
InitializePresetActionsList(IEnumerable<ItemInfo>)
Initializes the list of preset actions which can be created.
Declaration
protected void InitializePresetActionsList(IEnumerable<ItemInfo> items)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<ItemInfo> | items | An enumeration of action names. |