EventSchemaTraceListener.TraceLogRetentionOption 属性

定义

获取该文件的跟踪日志保留选项。Gets the trace log retention option for the file.

public:
 property System::Diagnostics::TraceLogRetentionOption TraceLogRetentionOption { System::Diagnostics::TraceLogRetentionOption get(); };
public System.Diagnostics.TraceLogRetentionOption TraceLogRetentionOption { get; }
member this.TraceLogRetentionOption : System.Diagnostics.TraceLogRetentionOption
Public ReadOnly Property TraceLogRetentionOption As TraceLogRetentionOption

属性值

示例

下面的代码示例演示如何显示TraceLogRetentionOption属性的值。The following code example demonstrates how to display the value of the TraceLogRetentionOption property. 此代码示例是为EventSchemaTraceListener类提供的更大示例的一部分。This code example is part of a larger example that is provided for the EventSchemaTraceListener class.

Console.WriteLine("TraceLogRetentionOption =  " + ((EventSchemaTraceListener)ts.Listeners["eventListener"]).TraceLogRetentionOption);
Console.WriteLine("TraceLogRetentionOption =  " + CType(ts.Listeners("eventListener"), EventSchemaTraceListener).TraceLogRetentionOption.ToString())

适用于