Show / Hide Table of Contents

Class Tracer

Provides structured tracing and stashing of values for debugging.

Inheritance
object
Tracer
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: CoverageKiller2.Logging
Assembly: CoverageKiller2.dll
Syntax
public class Tracer
Remarks

CK2.00.00.0000

Constructors

Tracer(Type, int)

Declaration
public Tracer(Type ownerType, int indentTabs = 1)
Parameters
Type Name Description
Type ownerType
int indentTabs

Properties

Enabled

Declaration
public bool Enabled { get; set; }
Property Value
Type Description
bool

IndentTabs

Declaration
public int IndentTabs { get; }
Property Value
Type Description
int

Methods

Log(string, LogOptions, string)

Declaration
public void Log(string message, Tracer.LogOptions options = LogOptions.None, string memberName = "")
Parameters
Type Name Description
string message
Tracer.LogOptions options
string memberName

Log(string, IEnumerable<(string, object)>, LogOptions, string)

Declaration
public void Log(string message, IEnumerable<(string, object)> dataPoints, Tracer.LogOptions options = LogOptions.None, string memberName = "")
Parameters
Type Name Description
string message
IEnumerable<(string, object)> dataPoints
Tracer.LogOptions options
string memberName

Log(string, string, LogOptions, string)

Declaration
public void Log(string message, string tag, Tracer.LogOptions options = LogOptions.None, string memberName = "")
Parameters
Type Name Description
string message
string tag
Tracer.LogOptions options
string memberName

Log(string, string, IEnumerable<(string, object)>, LogOptions, string)

Declaration
public void Log(string message, string tag, IEnumerable<(string, object)> dataPoints, Tracer.LogOptions options = LogOptions.None, string memberName = "")
Parameters
Type Name Description
string message
string tag
IEnumerable<(string, object)> dataPoints
Tracer.LogOptions options
string memberName

Recall(string)

Retrieves a previously stashed value by name.

Declaration
public string Recall(string name)
Parameters
Type Name Description
string name
Returns
Type Description
string

Stash(string, object)

Stores a named value (converted to string).

Declaration
public void Stash(string name, object value)
Parameters
Type Name Description
string name
object value

StashProperty<T>(string, T)

Tries to stash the value of a specific property from an object. Honors UnsafeTraceAttribute.

Declaration
public void StashProperty<T>(string propertyName, T target)
Parameters
Type Name Description
string propertyName
T target
Type Parameters
Name Description
T

Trace<T>(T, string, string)

Stashes a value and returns it, using the caller's method name by default.

Declaration
public T Trace<T>(T operation, string name = "", string callerName = "")
Parameters
Type Name Description
T operation
string name
string callerName
Returns
Type Description
T
Type Parameters
Name Description
T

Extension Methods

PingService.PingPong<T>(T, string)
PingService.PingPong<T>(T, string, string)
PingService.PingPong<T, TResult>(T, Func<TResult>, string, string)
PingService.Ping<T>(T, string)
PingService.Ping<T>(T, string, string)
PingService.Ping<T>(T, Type[], string)
PingService.Pong<T>(T, string)
PingService.Pong<T>(T, string, string)
PingService.Pong<T>(T, Type, string)
PingService.Pong<T>(T, Type[], string)
PingService.Pong<T, TResult>(T, Func<TResult>, string, string)
In this article
Back to top Generated by DocFX