Class 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
Implements
Inherited Members
Namespace: Bayat.Json.Serialization
Assembly: Bayat.Json.Runtime.dll
Syntax
public class MemoryTraceWriter : ITraceWriter
Constructors
| Improve this Doc View SourceMemoryTraceWriter()
Initializes a new instance of the Memory
Declaration
public MemoryTraceWriter()
Properties
| Improve this Doc View SourceLevelFilter
Gets the System.
Info
will exclude Verbose
messages and include Info
,
Warning
and Error
messages.
Declaration
public TraceLevel LevelFilter { get; set; }
Property Value
Type | Description |
---|---|
System. |
The System. |
Methods
| Improve this Doc View SourceGetTraceMessages()
Returns an enumeration of the most recent trace messages.
Declaration
public IEnumerable<string> GetTraceMessages()
Returns
Type | Description |
---|---|
System. |
An enumeration of the most recent trace messages. |
ToString()
Returns a System.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System. |
A System. |
Overrides
Trace(TraceLevel, String, Exception)
Writes the specified trace level, message and optional exception.
Declaration
public void Trace(TraceLevel level, string message, Exception ex)
Parameters
Type | Name | Description |
---|---|---|
System. |
level | The System. |
System. |
message | The trace message. |
System. |
ex | The trace exception. This parameter is optional. |