Sdílet prostřednictvím


TraceContextRecord(String, String, Boolean, Exception) Konstruktor

Definice

Inicializuje novou instanci TraceContextRecord třídy.

public:
 TraceContextRecord(System::String ^ category, System::String ^ msg, bool isWarning, Exception ^ errorInfo);
public TraceContextRecord (string category, string msg, bool isWarning, Exception errorInfo);
new System.Web.TraceContextRecord : string * string * bool * Exception -> System.Web.TraceContextRecord
Public Sub New (category As String, msg As String, isWarning As Boolean, errorInfo As Exception)

Parametry

category
String

Kategorie trasování, která zprávu přijme.

msg
String

Zpráva trasování.

isWarning
Boolean

true pokud je metoda přidružená k TraceContextRecordWarn metodě; false pokud je metoda trasování metodou Write .

errorInfo
Exception

Objekt Exception , který obsahuje další informace o chybě.

Poznámky

Každé volání TraceContext.Write metod a TraceContext.Warn vygeneruje TraceContextRecord objekt, který je přidán do TraceContextEventArgs.TraceRecords kolekce zpráv. Volání Warn metody nastaví IsWarning vlastnost na true, zatímco Write volání metody ji nastaví na false.

Platí pro

Viz také