SourceFilter コンストラクタ
アセンブリ: System (system.dll 内)



2 つの異なる ソース フィルタを使用して、TraceData メソッドを呼び出すコード例を次に示します。1 つのフィルタは架空の名前で、もう 1 つのフィルタは現在のトレース ソースの名前です。最初の例ではトレースはコンソールに書き込まれませんが、2 番目の例では書き込まれます。このコード例は、TraceSource クラスのトピックで取り上げているコード例の一部分です。
' Test the filter on the ConsoleTraceListener. ts.Listeners("console").Filter = New SourceFilter("No match") ts.TraceData(TraceEventType.Information, 5, "SourceFilter should reject this message for the console trace listener.") ts.Listeners("console").Filter = New SourceFilter("TraceTest") ts.TraceData(TraceEventType.Information, 6, "SourceFilter should let this message through on the console trace listener.")
// Test the filter on the ConsoleTraceListener. ts.Listeners["console"].Filter = new SourceFilter("No match"); ts.TraceData(TraceEventType.Information, 5, "SourceFilter should reject this message for the console trace listener."); ts.Listeners["console"].Filter = new SourceFilter("TraceTest"); ts.TraceData(TraceEventType.Information, 6, "SourceFilter should let this message through on the console trace listener.");

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に収録されているすべての辞書からSourceFilter コンストラクタを検索する場合は、下記のリンクをクリックしてください。

- SourceFilter コンストラクタのページへのリンク