Export (0) Print
Expand All

EventTypeFilter.ShouldTrace Method

Determines whether the trace listener should trace the event.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)

public override bool ShouldTrace(
	TraceEventCache cache,
	string source,
	TraceEventType eventType,
	int id,
	string formatOrMessage,
	Object[] args,
	Object data1,
	Object[] data
)

Parameters

cache
Type: System.Diagnostics.TraceEventCache

A TraceEventCache that represents the information cache for the trace event.

source
Type: System.String

The name of the source.

eventType
Type: System.Diagnostics.TraceEventType

One of the TraceEventType values.

id
Type: System.Int32

A trace identifier number.

formatOrMessage
Type: System.String

The format to use for writing an array of arguments, or a message to write.

args
Type: System.Object[]

An array of argument objects.

data1
Type: System.Object

A trace data object.

data
Type: System.Object[]

An array of trace data objects.

Return Value

Type: System.Boolean
trueif the trace should be produced; otherwise, false.

If the value of the eventType parameter is greater than or equal to the value of the EventType property, the method returns true.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft