TraceListener.GetSupportedAttributes メソッド
アセンブリ: System (system.dll 内)

Dim returnValue As String() returnValue = Me.GetSupportedAttributes
トレース リスナによってサポートされるカスタム属性の名前を付ける文字列配列。カスタム属性がない場合は null 参照 (Visual Basic では Nothing)。

GetSupportedAttributes の既定の実装では、null 参照 (Visual Basic では Nothing) が返されます。
継承時の注意 TraceListener クラスまたは派生クラスから継承する場合は、GetSupportedAttributes メソッドをオーバーライドしてクラスにカスタム属性を提供できます。
カスタム トレース リスナに対する GetSupportedAttributes メソッドのオーバーライドを次のコード例に示します。
<HostProtection(Synchronization:=True)> _ Public Class TestListener Inherits TextWriterTraceListener Public Sub New(ByVal fileName As String) MyBase.New(fileName) End Sub 'New Public Sub New(ByVal fileName As String, ByVal name As String) MyBase.New(fileName, name) End Sub 'New Public Overrides Sub Write(ByVal s As String) MyBase.Write(("TestListener " + s)) End Sub 'Write Public Overrides Sub WriteLine(ByVal s As String) MyBase.WriteLine(("TestListener " + s)) End Sub 'WriteLine Protected Overrides Function GetSupportedAttributes() As String() ' The following string array will allow the use of ' the name "customListenerAttribute" in the configuration file. Return New String() {"customListenerAttribute"} End Function 'GetSupportedAttributes End Class 'TestListener
[HostProtection(Synchronization = true)] public class TestListener : TextWriterTraceListener { public TestListener(string fileName) : base(fileName) { } public TestListener(string fileName, string name) : base(fileName, name) {} public override void Write(string s) { base.Write("TestListener " + s); } public override void WriteLine(string s) { base.WriteLine("TestListener " + s); } protected override string[] GetSupportedAttributes() { // The following string array will allow the use of // the name "customListenerAttribute" in the configuration file. return new string[] { "customListenerAttribute" }; } }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からTraceListener.GetSupportedAttributes メソッドを検索する場合は、下記のリンクをクリックしてください。

- TraceListener.GetSupportedAttributes メソッドのページへのリンク