C# Class Newtonsoft.Json.Serialization.MemoryTraceWriter

Represents a trace writer that writes to memory. When the trace message limit is reached then old trace messages will be removed as new messages are added.
Inheritance: ITraceWriter
Datei anzeigen Open project: JamesNK/Newtonsoft.Json Class Usage Examples

Public Methods

Method Description
GetTraceMessages ( ) : IEnumerable

Returns an enumeration of the most recent trace messages.

MemoryTraceWriter ( ) : System

Initializes a new instance of the MemoryTraceWriter class.

ToString ( ) : string

Returns a String of the most recent trace messages.

Trace ( TraceLevel level, string message, Exception ex ) : void

Writes the specified trace level, message and optional exception.

Method Details

GetTraceMessages() public method

Returns an enumeration of the most recent trace messages.
public GetTraceMessages ( ) : IEnumerable
return IEnumerable

MemoryTraceWriter() public method

Initializes a new instance of the MemoryTraceWriter class.
public MemoryTraceWriter ( ) : System
return System

ToString() public method

Returns a String of the most recent trace messages.
public ToString ( ) : string
return string

Trace() public method

Writes the specified trace level, message and optional exception.
public Trace ( TraceLevel level, string message, Exception ex ) : void
level TraceLevel The at which to write this trace.
message string The trace message.
ex System.Exception The trace exception. This parameter is optional.
return void