Joutsen Logging v0.5.0+22-gec3d058
Public Member Functions | Properties | List of all members
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. More...
 
override string ToString (string format, IFormatProvider formatProvider)
 Formats the scope into a string. More...
 
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. More...
 
- Public Member Functions inherited from TypeScope
 TypeScope (Type type)
 create a new instance for a type. More...
 
virtual string ToString (string format, IFormatProvider formatProvider)
 Formats the scope into a string. More...
 
override string ToString ()
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
virtual 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

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

Detailed Description

A scope implementation that represents a method of a type.

Since
Unrelesed

Constructor & Destructor Documentation

◆ MethodScope()

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 MethodScope.Equals ( object  obj)

◆ GetHashCode()

override int MethodScope.GetHashCode ( )

◆ ToNamedStrings()

override Map< string, string > 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 TypeScope.

◆ ToString()

override string 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 TypeScope.

Property Documentation

◆ MethodName

string MethodScope.MethodName
get

the name of the method.