Joutsen Logging v0.5.0+26-g72240ac
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Joutsen.Logging.MethodScope Class Reference

A scope implementation that represents a method of a type. More...

Public Member Functions

 MethodScope (Type type, [CallerMemberName]string methodName=null)
 Creates a new scope for a type and a method.
 
override string ToString (string format, IFormatProvider formatProvider)
 Formats the scope into a string.
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override 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.
 
- Public Member Functions inherited from Joutsen.Logging.TypeScope
 TypeScope (Type type)
 create a new instance for a type.
 
override string ToString ()
 
override bool Equals (object obj)
 
override int GetHashCode ()
 

Properties

string MethodName [get]
 the name of the method.
 
- Properties inherited from Joutsen.Logging.TypeScope
Type Type [get]
 the type represented by the scope.
 

Detailed Description

A scope implementation that represents a method of a type.

Since
Unrelesed

Constructor & Destructor Documentation

◆ MethodScope()

Joutsen.Logging.MethodScope.MethodScope ( Type  type,
[CallerMemberName] string  methodName = null 
)

Creates a new scope for a type and a method.

Parameters
typethe type that contains the method
methodNamethe name of a specific method. If not provided the compiler will fill in the name of the method that is calling this constructor.

Member Function Documentation

◆ Equals()

override bool Joutsen.Logging.MethodScope.Equals ( object  obj)

◆ GetHashCode()

override int Joutsen.Logging.MethodScope.GetHashCode ( )

◆ ToNamedStrings()

override Map< string, string > Joutsen.Logging.MethodScope.ToNamedStrings ( string  format,
IFormatProvider  formatProvider 
)
virtual

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

Reimplemented from Joutsen.Logging.TypeScope.

◆ ToString()

override string Joutsen.Logging.MethodScope.ToString ( string  format,
IFormatProvider  formatProvider 
)
virtual

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 'f' for the fullname and 'n' for the name without namespace and 'q' for the fully qualified assembly name of the type.

Reimplemented from Joutsen.Logging.TypeScope.

Property Documentation

◆ MethodName

string Joutsen.Logging.MethodScope.MethodName
get

the name of the method.