TraceSources Class
Singleton wrapper for TraceSource
Namespace
Songhay.Diagnostics
Base Types
  • object
graph BT Type-->Base0["object"] Type["TraceSources"] class Type type-node

Syntax

public class TraceSources

Remarks

Based on Fonlow.Diagnostics by Zijian Huang [https://github.com/zijianhuang/Fonlow.Diagnostics] Also see “Use TraceSource Efficiently” [http://www.codeproject.com/Tips/1071853/Use-TraceSource-Efficiently]

Fields

Name Field Type Constant Value Summary
DefaultTraceSourceName string rx-trace
The conventional TraceSource name.
static

Properties

Name Property Type Summary
ConfiguredTraceSourceName string
The configured trace source name
static
Instance TraceSources
Gets the instance.
static
IsConfiguredTraceSourceNameLoaded bool
The is configured trace source name loaded?
static
this[string] TraceSource?
Gets the TraceSource with the specified name.

Methods

Name Return Value Summary
GetTraceSource(string) TraceSource?
Gets the trace source.
GetTraceSourceFromConfiguredName() TraceSource?
Gets the name of the trace source from configuration.

Extension Methods

Name Value Summary
GetConfiguredTraceSource(IConfiguration?, string) TraceSource?
Gets the configured trace source.
GetConfiguredTraceSource(IConfiguration?) TraceSource?
Gets the configured trace source.
GetConfiguredTraceSource() TraceSource?
Gets the configured trace source.
IsAssignableToISerializable<TraceSources>() bool
Determines whether the specified type can be assigned to System.Runtime.Serialization.ISerializable.
ToObjectOrDbNull<TraceSources>() object
Boxes the nullable in object or returns DBNull.
ToReferenceTypeValueOrThrow<TraceSources>(string) T
Returns the non-null value of the specified, nullable reference type or throws an ArgumentNullException when the value is null.