C# Class Common.Logging.MultipleLogger.MultiLoggerGlobalVariablesContext

A global context for logger variables
Inheritance: IVariablesContext
Datei anzeigen Open project: net-commons/common-logging Class Usage Examples

Public Methods

Method Description
Clear ( ) : void

Clears the global context variables

Contains ( string key ) : bool

Checks if a variable is set within the global context

Get ( string key ) : object

Gets the value of a variable within the global context

MultiLoggerGlobalVariablesContext ( IEnumerable loggers ) : System.Collections

Initializes a new instance of the MultiLoggerGlobalVariablesContext class.

Remove ( string key ) : void

Removes a variable from the global context by key

Set ( string key, object value ) : void

Sets the value of a new or existing variable within the global context

Method Details

Clear() public method

Clears the global context variables
public Clear ( ) : void
return void

Contains() public method

Checks if a variable is set within the global context
public Contains ( string key ) : bool
key string The key of the variable to check for
return bool

Get() public method

Gets the value of a variable within the global context
public Get ( string key ) : object
key string The key of the variable to get
return object

MultiLoggerGlobalVariablesContext() public method

Initializes a new instance of the MultiLoggerGlobalVariablesContext class.
public MultiLoggerGlobalVariablesContext ( IEnumerable loggers ) : System.Collections
loggers IEnumerable The loggers.
return System.Collections

Remove() public method

Removes a variable from the global context by key
public Remove ( string key ) : void
key string The key of the variable to remove
return void

Set() public method

Sets the value of a new or existing variable within the global context
public Set ( string key, object value ) : void
key string The key of the variable that is to be added
value object The value to add
return void