Table of Contents

Class TraceSourceExtensions

Namespace
Songhay.Extensions
Assembly
SonghayCore.dll

Extensions of TraceSource

public static class TraceSourceExtensions
Inheritance
TraceSourceExtensions
Inherited Members

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]

Methods

TraceError(TraceSource?, Exception)

Traces the error.

public static void TraceError(this TraceSource? traceSource, Exception ex)

Parameters

traceSource TraceSource

The trace source.

ex Exception

The exception.

TraceError(TraceSource?, Exception?, bool)

Traces the error.

public static void TraceError(this TraceSource? traceSource, Exception? ex, bool includeStackTrace)

Parameters

traceSource TraceSource

The trace source.

ex Exception

The exception.

includeStackTrace bool

When true, include StackTrace info.

TraceError(TraceSource?, string)

Traces the error.

public static void TraceError(this TraceSource? traceSource, string message)

Parameters

traceSource TraceSource

The trace source.

message string

The message.

TraceError(TraceSource?, string, params object[])

Traces the error.

public static void TraceError(this TraceSource? traceSource, string format, params object[] args)

Parameters

traceSource TraceSource

The trace source.

format string

The format.

args object[]

The arguments.

TraceVerbose(TraceSource?, string)

Trace event type Verbose

public static void TraceVerbose(this TraceSource? traceSource, string message)

Parameters

traceSource TraceSource

The trace source.

message string

The message.

TraceVerbose(TraceSource?, string, params object[])

Trace event type Verbose

public static void TraceVerbose(this TraceSource? traceSource, string format, params object[] args)

Parameters

traceSource TraceSource

The trace source.

format string

The format.

args object[]

The arguments.

TraceWarning(TraceSource?, string)

Trace event type Warning

public static void TraceWarning(this TraceSource? traceSource, string message)

Parameters

traceSource TraceSource

The trace source.

message string

The message.

TraceWarning(TraceSource?, string, params object[])

Trace event type Warning

public static void TraceWarning(this TraceSource? traceSource, string format, params object[] args)

Parameters

traceSource TraceSource

The trace source.

format string

The format.

args object[]

The arguments.

WithSourceLevels(TraceSource?)

Returns the TraceSource with Switch Level All.

public static TraceSource? WithSourceLevels(this TraceSource? traceSource)

Parameters

traceSource TraceSource

The trace source.

Returns

TraceSource

WithSourceLevels(TraceSource?, SourceLevels)

Returns the TraceSource with the specified SourceLevels.

public static TraceSource? WithSourceLevels(this TraceSource? traceSource, SourceLevels levels)

Parameters

traceSource TraceSource

The trace source.

levels SourceLevels

The levels.

Returns

TraceSource

WriteLine(TraceSource?, string)

Trace event type Information

public static void WriteLine(this TraceSource? traceSource, string message)

Parameters

traceSource TraceSource

The trace source.

message string

The message.

Remarks

WriteLine(TraceSource?, string, params object[])

Trace event type Information

public static void WriteLine(this TraceSource? traceSource, string format, params object[] args)

Parameters

traceSource TraceSource

The trace source.

format string

The format.

args object[]

The arguments.

Remarks