C# Class CK.Core.LogFilter

Afficher le fichier Open project: Invenietis/ck-core Class Usage Examples

Méthodes publiques

Свойство Type Description
Debug LogFilter
Group LogLevelFilter
Invalid LogFilter
Line LogLevelFilter
Monitor LogFilter
Off LogFilter
Release LogFilter
Terse LogFilter
Undefined LogFilter
Verbose LogFilter

Méthodes publiques

Méthode Description
Combine ( LogFilter other ) : LogFilter

Combines this filter with another one. Line and Group level filters are combined with Combine(LogLevelFilter,LogLevelFilter).

Combine ( LogLevelFilter x, LogLevelFilter y ) : LogLevelFilter

Combines two enums LogLevelFilter into one. The resulting filter is the more verbose one (the smallest level). LogLevelFilter.Invalid is considered as LogLevelFilter.None (it has no impact). This operation is commutative and associative: different order of combination always give the same result.

CombineNoneOnly ( LogFilter other ) : LogFilter

Combines this filter with another one only if Line or Group is LogLevelFilter.None.

Equals ( object obj ) : bool

Overridden to compare Line and Group.

GetHashCode ( ) : int

Overridden to compute hash based on Line and Group values.

HasImpactOn ( LogFilter x ) : bool

Tests if Combine(LogFilter)">combining this and

LogFilter ( LogLevelFilter group, LogLevelFilter line ) : CK.Text

Initializes a new LogFilter with a level for Groups and Line logs.

Parse ( string filter ) : LogFilter

Parses the filter: it can be a predefined filter as ("Undefined", "Debug", "Verbose", etc.) or as {GroupLogLevelFilter,LineLogLevelFilter} pairs like "{None,None}", "{Error,Trace}".

SetGroup ( LogLevelFilter group ) : LogFilter

Returns a LogFilter with a given LogLevelFilter for the Group.

SetLine ( LogLevelFilter line ) : LogFilter

Returns a LogFilter with a given LogLevelFilter for the Line.

ToString ( ) : string

Overridden to show the group and the line level.

TryParse ( string s, LogFilter &f ) : bool

Tries to parse a LogFilter: it can be a predefined filter as ("Undefined", "Debug", "Verbose", etc.) or as {GroupLogLevelFilter,LineLogLevelFilter} pairs like "{None,None}", "{Error,Trace}".

operator ( ) : bool

Equality operator.

Method Details

Combine() public méthode

Combines this filter with another one. Line and Group level filters are combined with Combine(LogLevelFilter,LogLevelFilter).
public Combine ( LogFilter other ) : LogFilter
other LogFilter The other filter to combine with this one.
Résultat LogFilter

Combine() static public méthode

Combines two enums LogLevelFilter into one. The resulting filter is the more verbose one (the smallest level). LogLevelFilter.Invalid is considered as LogLevelFilter.None (it has no impact). This operation is commutative and associative: different order of combination always give the same result.
static public Combine ( LogLevelFilter x, LogLevelFilter y ) : LogLevelFilter
x LogLevelFilter First filter level.
y LogLevelFilter Second filter level.
Résultat LogLevelFilter

CombineNoneOnly() public méthode

Combines this filter with another one only if Line or Group is LogLevelFilter.None.
public CombineNoneOnly ( LogFilter other ) : LogFilter
other LogFilter The other filter to combine with this one.
Résultat LogFilter

Equals() public méthode

Overridden to compare Line and Group.
public Equals ( object obj ) : bool
obj object Other object.
Résultat bool

GetHashCode() public méthode

Overridden to compute hash based on Line and Group values.
public GetHashCode ( ) : int
Résultat int

HasImpactOn() public méthode

Tests if Combine(LogFilter)">combining this and
public HasImpactOn ( LogFilter x ) : bool
x LogFilter The other filter.
Résultat bool

LogFilter() public méthode

Initializes a new LogFilter with a level for Groups and Line logs.
public LogFilter ( LogLevelFilter group, LogLevelFilter line ) : CK.Text
group LogLevelFilter Filter for groups.
line LogLevelFilter Filter for lines.
Résultat CK.Text

Parse() public static méthode

Parses the filter: it can be a predefined filter as ("Undefined", "Debug", "Verbose", etc.) or as {GroupLogLevelFilter,LineLogLevelFilter} pairs like "{None,None}", "{Error,Trace}".
public static Parse ( string filter ) : LogFilter
filter string Predefined filter as (Undefined, Debug, Verbose, etc.) or as {LineLogLevelFilter,GroupLogLevelFilter} like {None,None}, {Error,Trace}.
Résultat LogFilter

SetGroup() public méthode

Returns a LogFilter with a given LogLevelFilter for the Group.
public SetGroup ( LogLevelFilter group ) : LogFilter
group LogLevelFilter Filter for the group.
Résultat LogFilter

SetLine() public méthode

Returns a LogFilter with a given LogLevelFilter for the Line.
public SetLine ( LogLevelFilter line ) : LogFilter
line LogLevelFilter Filter for the line.
Résultat LogFilter

ToString() public méthode

Overridden to show the group and the line level.
public ToString ( ) : string
Résultat string

TryParse() public static méthode

Tries to parse a LogFilter: it can be a predefined filter as ("Undefined", "Debug", "Verbose", etc.) or as {GroupLogLevelFilter,LineLogLevelFilter} pairs like "{None,None}", "{Error,Trace}".
public static TryParse ( string s, LogFilter &f ) : bool
s string Filter to parse.
f LogFilter Resulting filter.
Résultat bool

operator() public static méthode

Equality operator.
public static operator ( ) : bool
Résultat bool

Property Details

Debug static_oe public_oe property

Debug filter enables full LogLevelFilter.Trace for both Line and Group.
static public LogFilter,CK.Core Debug
Résultat LogFilter

Group public_oe property

The filter that applies to groups.
public LogLevelFilter Group
Résultat LogLevelFilter

Invalid static_oe public_oe property

Invalid must be used as a special value. It is LogLevelFilter.Invalid for both Line and Group.
static public LogFilter,CK.Core Invalid
Résultat LogFilter

Line public_oe property

The filter that applies to log lines (Trace, Info, Warn, Error and Fatal).
public LogLevelFilter Line
Résultat LogLevelFilter

Monitor static_oe public_oe property

While monitoring, only errors and warnings are captured, whereas all Groups appear to get the detailed structure of the activity.
static public LogFilter,CK.Core Monitor
Résultat LogFilter

Off static_oe public_oe property

Off filter does not capture anything.
static public LogFilter,CK.Core Off
Résultat LogFilter

Release static_oe public_oe property

Release filter captures only LogLevelFilter.Errors for both Line and Group.
static public LogFilter,CK.Core Release
Résultat LogFilter

Terse static_oe public_oe property

Terse filter captures only errors for Line and limits Groups to LogLevelFilter.Info level.
static public LogFilter,CK.Core Terse
Résultat LogFilter

Undefined static_oe public_oe property

Undefined filter is LogLevelFilter.None for both Line and Group. This is the same as using the default constructor for this structure (it is exposed here for clarity).
static public LogFilter,CK.Core Undefined
Résultat LogFilter

Verbose static_oe public_oe property

Verbose LogLevelFilter.Trace all Groups but limits Line to LogLevelFilter.Info level.
static public LogFilter,CK.Core Verbose
Résultat LogFilter