C# Class Common.Logging.MultipleLogger.MultiLoggerGlobalVariablesContext

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

Méthodes publiques

Méthode 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 méthode

Clears the global context variables
public Clear ( ) : void
Résultat void

Contains() public méthode

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
Résultat bool

Get() public méthode

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

MultiLoggerGlobalVariablesContext() public méthode

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

Remove() public méthode

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

Set() public méthode

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
Résultat void