C# Class CK.Core.ActivityMonitor.SourceFilter

Manages source filtering.
Exibir arquivo Open project: Invenietis/ck-core

Public Properties

Property Type Description
FilterSource FilterSourceDelegate

Public Methods

Method Description
ClearAll ( ) : void

Clears all existing filters.

ClearMinimals ( ) : void

Clears all existing Minimal filters.

ClearOverrides ( ) : void

Clears all existing Override filters.

DefaultFilter ( string &fileName, int &lineNumber ) : SourceLogFilter

Default filter, challenging file names added by SetFilter method.

SetFilter ( SourceLogFilter filter, [ fileName = null ) : void

Sets a SourceLogFilter for a given file. Use SourceLogFilter.Undefined to clear any existing configuration for the file.

SetMinimalFilter ( LogFilter minimalFilter, [ fileName = null ) : void

Sets a minimal LogFilter for a given file. Use LogFilter.Undefined to clear it.

SetOverrideFilter ( LogFilter overrideFilter, [ fileName = null ) : void

Sets an override LogFilter for a given file: when not LogFilter.Undefined this takes precedence over IActivityMonitor.ActualFilter. Use LogFilter.Undefined to clear it.

Update ( Func mapper ) : void

Updates (or simply scans) all existing filters.

When the mapper returns SourceLogFilter.Undefined, the file configuration is removed.

Private Methods

Method Description
SourceFilter ( ) : System

Method Details

ClearAll() public static method

Clears all existing filters.
public static ClearAll ( ) : void
return void

ClearMinimals() public static method

Clears all existing Minimal filters.
public static ClearMinimals ( ) : void
return void

ClearOverrides() public static method

Clears all existing Override filters.
public static ClearOverrides ( ) : void
return void

DefaultFilter() public static method

Default filter, challenging file names added by SetFilter method.
public static DefaultFilter ( string &fileName, int &lineNumber ) : SourceLogFilter
fileName string The file name.
lineNumber int The line number.
return SourceLogFilter

SetFilter() public static method

Sets a SourceLogFilter for a given file. Use SourceLogFilter.Undefined to clear any existing configuration for the file.
public static SetFilter ( SourceLogFilter filter, [ fileName = null ) : void
filter SourceLogFilter The filter to set for the file.
fileName [ The file name: do not specify it to inject the path of your source file.
return void

SetMinimalFilter() public static method

Sets a minimal LogFilter for a given file. Use LogFilter.Undefined to clear it.
public static SetMinimalFilter ( LogFilter minimalFilter, [ fileName = null ) : void
minimalFilter LogFilter The minimal filter to set for the file.
fileName [ The file name: do not specify it to inject the path of your source file.
return void

SetOverrideFilter() public static method

Sets an override LogFilter for a given file: when not LogFilter.Undefined this takes precedence over IActivityMonitor.ActualFilter. Use LogFilter.Undefined to clear it.
public static SetOverrideFilter ( LogFilter overrideFilter, [ fileName = null ) : void
overrideFilter LogFilter The override filter to set for the file.
fileName [ The file name: do not specify it to inject the path of your source file.
return void

Update() public static method

Updates (or simply scans) all existing filters.
When the mapper returns SourceLogFilter.Undefined, the file configuration is removed.
public static Update ( Func mapper ) : void
mapper Func /// Function that takes the file name, the existing filter and maps it to a new filter. ///
return void

Property Details

FilterSource public_oe static_oe property

Holds a FilterSourceDelegate that can override filter configuration and/or alter source file name. It can be changed at any time and application is immediate. It is set by default to DefaultFilter.
public static FilterSourceDelegate FilterSource
return FilterSourceDelegate