Class SageStackTrace
Class to build Stack traces that we can later use in logging. The trace here is any hardcoded message passed to the object. Datetime and thread/process info will be added and each message will be written to a new line. When you want a dump of the stack call the StackTrace property which will return a string.
public class SageStackTrace : IDisposable
- Inheritance
-
SageStackTrace
- Implements
- Inherited Members
Constructors
SageStackTrace()
Creates a string builder with no capacity set to hold trace.
public SageStackTrace()
SageStackTrace(int)
Creates a string builder with no capacity set to hold trace.
public SageStackTrace(int iCapacity)
Parameters
iCapacity
intSize of the string builder object to hold the trace.
Properties
Disposed
Gets a value indicating whether the object is disposed.
protected bool Disposed { get; }
Property Value
StackTrace
Gets the full text dump of all messages added to the trace object.
public string StackTrace { get; }
Property Value
Methods
AddTrace(string)
Builds up a trace log that can be e.g. passed back to a web object.
public void AddTrace(string message)
Parameters
message
stringThe text to appear in the log.
CleanUp()
Removes all messages from stack.
protected virtual void CleanUp()
Dispose()
Releases all resources used by the SageStackTrace.
public void Dispose()
~SageStackTrace()
Destructor for SageStackTrace.
protected ~SageStackTrace()