Show / Hide Table of Contents

Class RoleBasedScenarioViewModel

Represents a role-based scenario.

Inheritance
object
BindableBase
ViewModelBase
DetailsViewModel
DetailsViewModel<IRoleBasedScenario>
RoleBasedScenarioViewModel
Implements
INotifyPropertyChanged
IOnSelected
IDisposable
IRoleBasedScenarioViewModel
IScenarioTreeItem
Inherited Members
DetailsViewModel<IRoleBasedScenario>.ParameterNames
DetailsViewModel<IRoleBasedScenario>.Item
DetailsViewModel<IRoleBasedScenario>.TelemetryClient
DetailsViewModel<IRoleBasedScenario>.ToString()
DetailsViewModel<IRoleBasedScenario>.ResetParameters()
DetailsViewModel<IRoleBasedScenario>.CreateParameters()
DetailsViewModel.ParameterEditor
DetailsViewModel.ParameterFactory
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)
Namespace: Phoenix.BotBrain.Overmind
Assembly: Phoenix.Plugin.BotBrain.Overmind.dll
Syntax
public class RoleBasedScenarioViewModel : DetailsViewModel<IRoleBasedScenario>, INotifyPropertyChanged, IOnSelected, IDisposable, IRoleBasedScenarioViewModel, IScenarioTreeItem

Constructors

View Source

RoleBasedScenarioViewModel(IEventAggregator, IParameterFactory, IServiceProvider, OvermindUIHelpers, IOvermindEditor, QualityPassViewModel)

Initializes a new instance of the RoleBasedScenarioViewModel class.

Declaration
public RoleBasedScenarioViewModel(IEventAggregator eventAggregator, IParameterFactory parameterFactory, IServiceProvider services, OvermindUIHelpers uiHelpers, IOvermindEditor editor, QualityPassViewModel qualityPass)
Parameters
Type Name Description
IEventAggregator eventAggregator

The event aggregator.

IParameterFactory parameterFactory

The parameter factory.

IServiceProvider services

The service provider used for construction.

OvermindUIHelpers uiHelpers

The overmind UI helpers.

IOvermindEditor editor

The overmind editor.

QualityPassViewModel qualityPass

The quality pass.

Properties

View Source

AreRequirementsEditable

Gets a value indicating whether or not requirements can be edited.

Declaration
public bool AreRequirementsEditable { get; }
Property Value
Type Description
bool
View Source

AvailableRequirements

Gets the available requirements.

Declaration
public ObservableCollection<RequirementInfo> AvailableRequirements { get; }
Property Value
Type Description
ObservableCollection<RequirementInfo>
View Source

CanEdit

Gets a value indicating whether or not parameters are editable.

Declaration
protected override bool CanEdit { get; }
Property Value
Type Description
bool
Overrides
DetailsViewModel.CanEdit
View Source

CreateRequirementCommand

Gets the command to create a requirement.

Declaration
public DelegateCommand<RequirementInfo> CreateRequirementCommand { get; }
Property Value
Type Description
DelegateCommand<RequirementInfo>
View Source

FailedMessage

Gets the failed message.

Declaration
public string? FailedMessage { get; }
Property Value
Type Description
string
View Source

FinishedTime

Gets the timestamp of the scenario when it finished.

Declaration
public DateTime FinishedTime { get; }
Property Value
Type Description
DateTime
View Source

HasFinished

Gets a value indicating whether the scenario has finished.

Declaration
public bool HasFinished { get; }
Property Value
Type Description
bool
View Source

HasStarted

Gets a value indicating whether the scenario has started.

Declaration
public bool HasStarted { get; }
Property Value
Type Description
bool
View Source

HasUnsavedChanges

Gets a value indicating whether this scenario has unsaved changes.

Declaration
public bool HasUnsavedChanges { get; }
Property Value
Type Description
bool
View Source

IsEditingRequirements

Gets or sets a value indicating whether or not requirements are being edited.

Declaration
public bool IsEditingRequirements { get; set; }
Property Value
Type Description
bool
View Source

Name

Gets the scenario name.

Declaration
public string Name { get; }
Property Value
Type Description
string
View Source

QualityPass

Gets the quality pass.

Declaration
public QualityPassViewModel QualityPass { get; }
Property Value
Type Description
QualityPassViewModel
View Source

RemoveRequirementCommand

Gets the command to remove a requirement.

Declaration
public DelegateCommand<IRequirementViewModel> RemoveRequirementCommand { get; }
Property Value
Type Description
DelegateCommand<IRequirementViewModel>
View Source

Requirements

Gets the collection of requirements.

Declaration
public ObservableCollection<IRequirementViewModel> Requirements { get; }
Property Value
Type Description
ObservableCollection<IRequirementViewModel>
View Source

Roles

Gets the collection of roles.

Declaration
public ObservableCollection<IRoleViewModel> Roles { get; }
Property Value
Type Description
ObservableCollection<IRoleViewModel>
View Source

Scenario

Gets or sets the scenario.

Declaration
public IRoleBasedScenario Scenario { get; set; }
Property Value
Type Description
IRoleBasedScenario
View Source

StartTime

Gets the timestamp of the scenario when it started.

Declaration
public DateTime StartTime { get; }
Property Value
Type Description
DateTime
View Source

Status

Gets the scenario status.

Declaration
public ScenarioStatus Status { get; }
Property Value
Type Description
ScenarioStatus
View Source

SummaryMessage

Gets the finished message.

Declaration
public string SummaryMessage { get; }
Property Value
Type Description
string
View Source

Title

Gets a descriptive title for displaying details about the item.

Declaration
public string Title { get; }
Property Value
Type Description
string
View Source

ToggleEditRequirementsCommand

Gets the command to toggle editing requirements.

Declaration
public DelegateCommand ToggleEditRequirementsCommand { get; }
Property Value
Type Description
DelegateCommand

Methods

View Source

AddRole(IRole)

Adds a role to the scenario.

Declaration
public void AddRole(IRole role)
Parameters
Type Name Description
IRole role

The role to add.

View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
View Source

OnParameterChanged(string)

Called when a parameter value changes.

Declaration
protected override void OnParameterChanged(string parameterName)
Parameters
Type Name Description
string parameterName

The parameter name.

Overrides
DetailsViewModel<IRoleBasedScenario>.OnParameterChanged(string)
View Source

OnSelected(object)

Occurs when the item is selected.

Declaration
public override void OnSelected(object sender)
Parameters
Type Name Description
object sender

The sender.

Overrides
DetailsViewModel.OnSelected(object)
View Source

OnStatusChanged(ScenarioStatusChangedEventArgs)

Updates the scenario status in the UI.

Declaration
public void OnStatusChanged(ScenarioStatusChangedEventArgs statusChanged)
Parameters
Type Name Description
ScenarioStatusChangedEventArgs statusChanged

The status changed event args.

View Source

RemoveRole(IRoleViewModel)

Removes a role from the scenario.

Declaration
public void RemoveRole(IRoleViewModel role)
Parameters
Type Name Description
IRoleViewModel role

The role view model to remove.

Implements

INotifyPropertyChanged
IOnSelected
IDisposable
IRoleBasedScenarioViewModel
IScenarioTreeItem

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