Show / Hide Table of Contents

Class BrainLogViewModel

The view model for the brain log panel.

Inheritance
object
BindableBase
ViewModelBase
BrainLogViewModel
Implements
INotifyPropertyChanged
IDisposable
Inherited Members
ViewModelBase.Services
ViewModelBase.Logger
ViewModelBase.TelemetryClient
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.BotBrain.Logging
Assembly: Phoenix.Plugin.BotBrain.Logging.dll
Syntax
public class BrainLogViewModel : ViewModelBase, INotifyPropertyChanged, IDisposable

Constructors

View Source

BrainLogViewModel(IEnumerable<LogEvent>, IServiceProvider)

Initializes a new instance of the BrainLogViewModel class.

Declaration
public BrainLogViewModel(IEnumerable<LogEvent> events, IServiceProvider services)
Parameters
Type Name Description
IEnumerable<LogEvent> events

The initial list of events.

IServiceProvider services

The export provider.

View Source

BrainLogViewModel(IServiceProvider)

Initializes a new instance of the BrainLogViewModel class.

Declaration
[ActivatorUtilitiesConstructor]
public BrainLogViewModel(IServiceProvider services)
Parameters
Type Name Description
IServiceProvider services

The service provider.

Properties

View Source

ClearLogCommand

Gets the command to clear all events.

Declaration
public DelegateCommand ClearLogCommand { get; }
Property Value
Type Description
DelegateCommand
View Source

Columns

Gets the columns.

Declaration
public ObservableCollection<LogColumn> Columns { get; }
Property Value
Type Description
ObservableCollection<LogColumn>
View Source

EventsView

Gets the events view.

Declaration
public ICollectionView EventsView { get; }
Property Value
Type Description
ICollectionView
View Source

FilterGroups

Gets the filter groups.

Declaration
public ObservableCollection<LogFilterGroupBase> FilterGroups { get; }
Property Value
Type Description
ObservableCollection<LogFilterGroupBase>
View Source

Filters

Gets the filters.

Declaration
public ObservableCollection<LogFilterBase> Filters { get; }
Property Value
Type Description
ObservableCollection<LogFilterBase>
View Source

IsConnected

Gets or sets a value indicating whether or not the log is connected to a brain.

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

LoadLogCommand

Gets the command to load a log from a file.

Declaration
public DelegateCommand LoadLogCommand { get; }
Property Value
Type Description
DelegateCommand
View Source

SaveLogCommand

Gets the command to save the log to a JSON file.

Declaration
public DelegateCommand SaveLogCommand { get; }
Property Value
Type Description
DelegateCommand
View Source

SerializerSettings

Gets the JSON serializer settings.

Declaration
protected Lazy<JsonSerializerSettings> SerializerSettings { get; }
Property Value
Type Description
Lazy<JsonSerializerSettings>
View Source

ToggleSelectAllFiltersCommand

Gets the command to select all filters in a group.

Declaration
public DelegateCommand<LogFilterBase> ToggleSelectAllFiltersCommand { get; }
Property Value
Type Description
DelegateCommand<LogFilterBase>

Methods

View Source

AddEvents(IEnumerable<LogEvent>)

Adds an enumeration of events.

Declaration
public void AddEvents(IEnumerable<LogEvent> events)
Parameters
Type Name Description
IEnumerable<LogEvent> events

The events.

View Source

AddFilter(LogFilterBase)

Adds the filter to the view.

Declaration
public void AddFilter(LogFilterBase vm)
Parameters
Type Name Description
LogFilterBase vm

The filter.

View Source

AddFilterGroup<T>(string)

Adds a filter group to the view.

Declaration
public void AddFilterGroup<T>(string name) where T : LogFilterBase
Parameters
Type Name Description
string name

The group name.

Type Parameters
Name Description
T

The filter type.

View Source

Clone()

Clones this brain log view model including events.

Declaration
public BrainLogViewModel Clone()
Returns
Type Description
BrainLogViewModel

The new brain log view model.

View Source

Dispose()

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

Declaration
public void Dispose()
View Source

IsEventVisible(LogEvent?)

Determines if an event is visible given the current filters.

Declaration
public bool IsEventVisible(LogEvent? e)
Parameters
Type Name Description
LogEvent e

The event.

Returns
Type Description
bool

True if it is visible.

View Source

OnEventReceived(object?, LogEvent)

Handles when an event is received from this brain.

Declaration
public void OnEventReceived(object? sender, LogEvent e)
Parameters
Type Name Description
object sender

The brain.

LogEvent e

The event.

Events

View Source

OnCleared

Occurs when all events are cleared.

Declaration
public event EventHandler? OnCleared
Event Type
Type Description
EventHandler
View Source

OnFilterChanged

Occurs when a filter is enabled or disabled.

Declaration
public event EventHandler? OnFilterChanged
Event Type
Type Description
EventHandler
View Source

VisibleEventAdded

Occurs when a visible event is added.

Declaration
public event EventHandler? VisibleEventAdded
Event Type
Type Description
EventHandler

Implements

INotifyPropertyChanged
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