Class Tracer
Provides structured tracing and stashing of values for debugging.
Assembly: CoverageKiller2.dll
Syntax
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
IndentTabs
Declaration
public int IndentTabs { get; }
Property Value
Methods
Log(string, LogOptions, string)
Declaration
public void Log(string message, Tracer.LogOptions options = LogOptions.None, string memberName = "")
Parameters
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
Log(string, string, LogOptions, string)
Declaration
public void Log(string message, string tag, Tracer.LogOptions options = LogOptions.None, string memberName = "")
Parameters
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
Recall(string)
Retrieves a previously stashed value by name.
Declaration
public string Recall(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
Stash(string, object)
Stores a named value (converted to string).
Declaration
public void Stash(string name, object value)
Parameters
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
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 Parameters
Extension Methods