Table of Contents

Class SageStackTrace

Namespace
Sage.CRM.Errors
Assembly
SageCRMNet.dll

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 int

Size 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

bool

StackTrace

Gets the full text dump of all messages added to the trace object.

public string StackTrace { get; }

Property Value

string

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 string

The 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()