Class ConsiderationViewModel
The view model for an consideration.
Inheritance
Inherited Members
Namespace: Phoenix.BotBrain
Assembly: Phoenix.Plugin.BotBrain.BrainEditor.dll
Syntax
public class ConsiderationViewModel : DetailsViewModel<IConsideration>, INotifyPropertyChanged, IConsiderationViewModel, IOnSelected, IItemInfoConstructors
View SourceConsiderationViewModel(IMetadataAccess, IParameterFactory, IServiceProvider)
Initializes a new instance of the ConsiderationViewModel class.
Declaration
public ConsiderationViewModel(IMetadataAccess metadata, IParameterFactory parameterFactory, IServiceProvider services)Parameters
| Type | Name | Description | 
|---|---|---|
| IMetadataAccess | metadata | The metadata container. | 
| IParameterFactory | parameterFactory | The parameter factory. | 
| IServiceProvider | services | The service provider. | 
Properties
View SourceBrain
Gets the bot brain.
Declaration
public IBotBrain? Brain { get; }Property Value
| Type | Description | 
|---|---|
| IBotBrain | 
BrainView
Gets or sets the bot brain view model.
Declaration
public IBotBrainViewModel? BrainView { get; set; }Property Value
| Type | Description | 
|---|---|
| IBotBrainViewModel | 
CanEdit
Gets a value indicating whether or not parameters are editable.
Declaration
protected override bool CanEdit { get; }Property Value
| Type | Description | 
|---|---|
| bool | 
Overrides
View SourceConsideration
Gets or sets the consideration.
Declaration
public IConsideration Consideration { get; set; }Property Value
| Type | Description | 
|---|---|
| IConsideration | 
ConsiderationInputRange
Gets the range of possible consideration input values.
Declaration
public float ConsiderationInputRange { get; }Property Value
| Type | Description | 
|---|---|
| float | 
DisplayName
Gets the display name.
Declaration
public string DisplayName { get; }Property Value
| Type | Description | 
|---|---|
| string | 
LabelFormatter
Gets the graph label formatter.
Declaration
public static Func<double, string> LabelFormatter { get; }Property Value
| Type | Description | 
|---|---|
| Func<double, string> | 
MaximumConsiderationInput
Gets or sets the maximum possible consideration input value.
Declaration
public float MaximumConsiderationInput { get; set; }Property Value
| Type | Description | 
|---|---|
| float | 
MinimumConsiderationInput
Gets or sets the minimum possible consideration input value.
Declaration
public float MinimumConsiderationInput { get; set; }Property Value
| Type | Description | 
|---|---|
| float | 
Name
Gets the name.
Declaration
public string Name { get; }Property Value
| Type | Description | 
|---|---|
| string | 
Visualization
Gets the consideration data to visualize on a graph.
Declaration
public SeriesCollection? Visualization { get; }Property Value
| Type | Description | 
|---|---|
| SeriesCollection | 
Methods
View SourceCreateParameters()
Creates an enumeration of parameters for the consideration.
Declaration
protected override IEnumerable<IParameter> CreateParameters()Returns
| Type | Description | 
|---|---|
| IEnumerable<IParameter> | An enumeration of parameters. | 
Overrides
View SourceOnParameterChanged(string)
Called when a parameter value changes.
Declaration
protected override void OnParameterChanged(string parameterName)Parameters
| Type | Name | Description | 
|---|---|---|
| string | parameterName | The parameter name. | 
Overrides
View SourceOnSelected(object)
Occurs when the item is selected.
Declaration
public override void OnSelected(object sender)Parameters
| Type | Name | Description | 
|---|---|---|
| object | sender | The sender. | 
Overrides
View SourceReset()
Resets the view model when the consideration's curve type changes.
Declaration
public void Reset()ResetParameters()
Re-creates the parameter editor.
Declaration
protected override void ResetParameters()