Export (0) Print
Expand All

TraceContextRecord Constructor

Initializes a new instance of the TraceContextRecord class.

Namespace:  System.Web
Assembly:  System.Web (in System.Web.dll)

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

Parameters

category
Type: System.String

The trace category that receives the message.

msg
Type: System.String

The trace message.

isWarning
Type: System.Boolean

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

errorInfo
Type: System.Exception

A Exception object that contains additional error information.

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.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft