Aracılığıyla paylaş


TraceSection.WriteToDiagnosticsTrace Özellik

Tanım

Sayfa izlemesi aracılığıyla gönderilen iletilerin sınıfın bir örneğine Trace iletilip iletilmeyeceğini belirten bir değer alır veya ayarlar.

public:
 property bool WriteToDiagnosticsTrace { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("writeToDiagnosticsTrace", DefaultValue=false)]
public bool WriteToDiagnosticsTrace { get; set; }
[<System.Configuration.ConfigurationProperty("writeToDiagnosticsTrace", DefaultValue=false)>]
member this.WriteToDiagnosticsTrace : bool with get, set
Public Property WriteToDiagnosticsTrace As Boolean

Özellik Değeri

true izleme iletileri sınıfına Trace gönderilirse; değilse, false. Varsayılan değer: false.

Öznitelikler

Örnekler

Aşağıdaki kod örneği özelliğinin WriteToDiagnosticsTrace nasıl kullanılacağını gösterir. Bu kod örneği, sınıfı için TraceSection sağlanan daha büyük bir örneğin parçasıdır.


// Get the current WriteToDiagnosticsTrace property value.
Boolean writeToDiagnosticsTraceValue = traceSection.WriteToDiagnosticsTrace;

// Set the WriteToDiagnosticsTrace property to true.
traceSection.WriteToDiagnosticsTrace = true;

' Get the current WriteToDiagnosticsTrace property value.
Dim writeToDiagnosticsTraceValue As Boolean = traceSection.WriteToDiagnosticsTrace

' Set the WriteToDiagnosticsTrace property to true.
traceSection.WriteToDiagnosticsTrace = True

Şunlara uygulanır