Switch.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입니다.

예제

다음 코드 샘플에서는 사용자 지정 스위치에 대해 인식할 수 없는 특성을 표시하는 방법을 보여 있습니다.

// Get the custom attributes for the trace source switch.
foreach (DictionaryEntry de in ts.Switch.Attributes)
    Console.WriteLine(de.Key + "  " + de.Value);
' Get the custom attributes for the trace source switch.

For Each de In ts.Switch.Attributes
    Console.WriteLine(de.Key + "  " + de.Value)
Next de

설명

Attributes 속성 애플리케이션의 구성 파일에서 참조 하는 사용자 지정 특성을 식별 합니다. 참조되지 않은 사용자 지정 특성은 열거되지 않습니다. 클래스에서 Switch 상속되는 클래스는 메서드를 재정의하고 GetSupportedAttributes 사용자 지정 특성 이름의 문자열 배열을 반환하여 사용자 지정 특성을 추가할 수 있습니다.

적용 대상