TraceListener.Attributes 속성

정의

애플리케이션 구성 파일에 정의된 사용자 지정 추적 수신기 특성을 가져옵니다.

public:
 property System::Collections::Specialized::StringDictionary ^ Attributes { System::Collections::Specialized::StringDictionary ^ get(); };
public System.Collections.Specialized.StringDictionary Attributes { get; }
member this.Attributes : System.Collections.Specialized.StringDictionary
Public ReadOnly Property Attributes As StringDictionary

속성 값

추적 수신기의 사용자 지정 특성이 포함된 StringDictionary입니다.

설명

클래스에서 TraceListener 상속되는 클래스는 메서드를 재정의하고 GetSupportedAttributes 사용자 지정 특성 이름의 문자열 배열을 반환하여 사용자 지정 특성을 추가할 수 있습니다. Attributes 속성 애플리케이션의 구성 파일에서 참조 되는 사용자 지정 특성을 식별 합니다. 예를 들어 다음 구성 파일에서 발췌한 DelimitedListTraceListener 사용자 지정 특성 "구분 기호"가 참조됩니다. 이 경우 속성은 Attributes 문자열 "구분 기호"를 포함하는 을 반환 StringDictionary 합니다.

<listeners>  
  <add name="delimitedListener"   
    type="System.Diagnostics.DelimitedListTraceListener"   
    delimiter=":"   
    initializeData="delimitedOutput.txt"   
    traceOutputOptions="ProcessId, DateTime" />  
  <remove name="Default" />  
</listeners>  

참조되지 않은 사용자 지정 특성은 열거되지 않습니다. 자세한 내용은 GetSupportedAttributes 메서드를 참조하세요.

적용 대상