Joutsen Logging v0.5.0+22-gec3d058
Public Member Functions | Properties | List of all members
ThreadScope Class Reference

A scope implementation that represents a thread. More...

Public Member Functions

 ThreadScope ()
 Creates a new instance for the current thread. More...
 
 ThreadScope (Thread thread)
 Creates a new instance fo a specific thread. More...
 
string ToString (string format, IFormatProvider formatProvider)
 Formats the scope into a string. More...
 
override string ToString ()
 
Map< string, string > ToNamedStrings (string format, IFormatProvider formatProvider)
 Creates a map of key value pairs which can be used to write the scope in a structured way. More...
 
Map< string, string > ToNamedStrings (string format, IFormatProvider formatProvider)
 Creates a map of key value pairs which can be used to write the scope in a structured way. More...
 

Properties

Thread Thread [get]
 

Detailed Description

A scope implementation that represents a thread.

Since
Unrelesed

Constructor & Destructor Documentation

◆ ThreadScope() [1/2]

ThreadScope.ThreadScope ( )

Creates a new instance for the current thread.

◆ ThreadScope() [2/2]

ThreadScope.ThreadScope ( Thread  thread)

Creates a new instance fo a specific thread.

Member Function Documentation

◆ ToNamedStrings()

Map< string, string > ThreadScope.ToNamedStrings ( string  format,
IFormatProvider  formatProvider 
)

Creates a map of key value pairs which can be used to write the scope in a structured way.

Parameters
formatthe string that defines the output format for the scope
formatProviderprovides localization information to format the scopes information
Returns
a map of names and values that make up the information of the scope

Implements Scope.

◆ ToString() [1/2]

override string ThreadScope.ToString ( )

◆ ToString() [2/2]

string ThreadScope.ToString ( string  format,
IFormatProvider  formatProvider 
)

Formats the scope into a string.

Parameters
formatthe format to use to represent the scope
formatProvidera format provider used for lacation specific representation
Returns
a string representation according to the provided format
Remarks
Supports format 'i' for the threadId and 'n' for the name.

Property Documentation

◆ Thread

Thread ThreadScope.Thread
get