TraceListener.Filter Property
Assembly: System (in system.dll)
[ComVisibleAttribute(false)] public: property TraceFilter^ Filter { TraceFilter^ get (); void set (TraceFilter^ value); }
/** @property */ public TraceFilter get_Filter () /** @property */ public void set_Filter (TraceFilter value)
public function get Filter () : TraceFilter public function set Filter (value : TraceFilter)
Not applicable.
Property Value
An object derived from the TraceFilter base class.A trace filter can be added to a trace listener to provide a layer of screening beyond that provided to the trace source by switches. For example, the EventTypeFilter can be added to a trace listener to control the event types that are output by the listener. Listeners that are called because the switch criteria are met can query their filter, if present, to determine if a trace is to be sent to output.
The following code example shows how to use the Filter property to add a source filter to a console trace listener. This code example is part of a larger example provided for the TraceSource class.
Windows 98, Windows Server 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
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.