Class LogFilterBase
An abstract class for creating filters for log event properties.
Inheritance
Implements
Inherited Members
Namespace: Phoenix.BotBrain.Logging
Assembly: Phoenix.Plugin.BotBrain.Logging.dll
Syntax
public abstract class LogFilterBase : BindableBase, INotifyPropertyChanged
Constructors
View SourceLogFilterBase(LogEvent)
Initializes a new instance of the LogFilterBase class.
Declaration
protected LogFilterBase(LogEvent e)
Parameters
Type | Name | Description |
---|---|---|
LogEvent | e | The log event to create the filter from. |
LogFilterBase(string)
Initializes a new instance of the LogFilterBase class.
Declaration
protected LogFilterBase(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The value to filter on. |
Properties
View SourceIsEnabled
Gets or sets a value indicating whether or not the filter is enabled.
Declaration
public bool IsEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsSelectAllFilter
Gets or sets a value indicating whether or not the filter is SelectAll filer.
Declaration
public bool IsSelectAllFilter { get; set; }
Property Value
Type | Description |
---|---|
bool |
Name
Gets the filter name.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
Value
Gets the value to filter on.
Declaration
public string? Value { get; }
Property Value
Type | Description |
---|---|
string |
Methods
View SourceIsEventVisible(LogEvent)
Determines if the log event should be visible, given this filter.
Declaration
public bool IsEventVisible(LogEvent e)
Parameters
Type | Name | Description |
---|---|---|
LogEvent | e | The log event. |
Returns
Type | Description |
---|---|
bool | True if the log event should be visible. |
IsEventVisible(string?)
Determines if the string should be visible, given this filter.
Declaration
public bool IsEventVisible(string? value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The string. |
Returns
Type | Description |
---|---|
bool | True if the string should be visible. |
Match(LogEvent)
Determines if the filter matches the given log event.
Declaration
public virtual bool Match(LogEvent e)
Parameters
Type | Name | Description |
---|---|---|
LogEvent | e | The log event. |
Returns
Type | Description |
---|---|
bool | True if the filter matches. |
Match(string?)
Determines if the filter matches the given string.
Declaration
public virtual bool Match(string? value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The string. |
Returns
Type | Description |
---|---|
bool | True if the filter matches. |
Read(LogEvent)
Gets the value to filter on from a log event.
Declaration
protected abstract string? Read(LogEvent e)
Parameters
Type | Name | Description |
---|---|---|
LogEvent | e | The log event. |
Returns
Type | Description |
---|---|
string | The value to filter on. |