Lezen in het Engels Bewerken

Delen via


TraceContextRecord(String, String, Boolean, Exception) Constructor

Definition

Initializes a new instance of the TraceContextRecord class.

public TraceContextRecord(string category, string msg, bool isWarning, Exception errorInfo);

Parameters

category
String

The trace category that receives the message.

msg
String

The trace message.

isWarning
Boolean

true if the method associated with the TraceContextRecord is the Warn method; false if the tracing method is the Write method.

errorInfo
Exception

A Exception object that contains additional error information.

Remarks

Every call to the TraceContext.Write and TraceContext.Warn methods generates a TraceContextRecord object that is added to the TraceContextEventArgs.TraceRecords messages collection. The Warn method call sets the IsWarning property to true, while the Write method calls set it to false.

Applies to

Product Versies
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also