DelimitedListTraceListener.GetSupportedAttributes 方法
定义
返回分隔的跟踪侦听器支持的自定义配置文件特性。Returns the custom configuration file attribute supported by the delimited trace listener.
protected:
override cli::array <System::String ^> ^ GetSupportedAttributes();
protected public:
override cli::array <System::String ^> ^ GetSupportedAttributes();
protected override string[] GetSupportedAttributes ();
protected internal override string[] GetSupportedAttributes ();
override this.GetSupportedAttributes : unit -> string[]
Protected Overrides Function GetSupportedAttributes () As String()
Protected Friend Overrides Function GetSupportedAttributes () As String()
返回
- String[]
包含单个值“delimiter”的字符串数组。A string array that contains the single value "delimiter".
注解
自定义特性是不是从基类继承的属性,可用于设置类的属性。A custom attribute is an attribute that is not inherited from the base class that can be used to set a property for the class. 的自定义特性 DelimitedListTraceListener 用于设置 Delimiter 属性。The custom attribute for DelimitedListTraceListener is used to set the Delimiter property. 下面的配置文件示例演示 delimiter 如何使用属性来设置 Delimiter 属性:The following configuration file example shows the use of the delimiter attribute to set the Delimiter property:
<configuration>
<system.diagnostics>
<trace autoflush="false" indentsize="4">
<listeners>
<add name="delimitedListener"
type="System.Diagnostics.DelimitedListTraceListener"
delimiter=":"
initializeData="delimitedOutput.txt"
traceOutputOptions="ProcessId, DateTime" />
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
</configuration>