C# Class IrcShark.ChannelFilter

The ChannelFilter class is used by LogHandlerSetting to define a channel specific filter.
Mostrar archivo Open project: hapm/IrcShark

Public Methods

Method Description
ApplysTo ( LogMessage msg ) : bool

Checks if the given LogMessage is filtered by this channel filter setting or not.

ParseFilter ( string filter ) : void

Parses a filter string and set the new values.

The string can contain the following characters: 'd' - Debug messages 'i' - Information messages 'w' - Warning messages 'e' - Error messages

If a character is in the string, the messages of the given type will pass the filter, else it will be dismissed.

ResetDefaults ( ) : void

Resets the filter to the defaults used by the associated LogHandlerSetting.

Private Methods

Method Description
ChannelFilter ( string channel, LogHandlerSetting defaults ) : System

Initializes a new instance of the ChannelFilter class.

The filter is copied from the defaults.

ChannelFilter ( string channel, LogHandlerSetting defaults, string filter ) : System

Initializes a new instance of the ChannelFilter class.

CopyDefaults ( ) : void

Copys the default values from the associated settings.

Method Details

ApplysTo() public method

Checks if the given LogMessage is filtered by this channel filter setting or not.
public ApplysTo ( LogMessage msg ) : bool
msg LogMessage The message to check.
return bool

ParseFilter() public method

Parses a filter string and set the new values.

The string can contain the following characters: 'd' - Debug messages 'i' - Information messages 'w' - Warning messages 'e' - Error messages

If a character is in the string, the messages of the given type will pass the filter, else it will be dismissed.

public ParseFilter ( string filter ) : void
filter string The filter string.
return void

ResetDefaults() public method

Resets the filter to the defaults used by the associated LogHandlerSetting.
public ResetDefaults ( ) : void
return void