Muokkaa

Jaa


EventProvider.IsEnabled Method

Definition

Determines whether a session enabled the provider.

Overloads

IsEnabled(Byte, Int64)

Determines whether any session is requesting the specified event from the provider.

IsEnabled()

Determines whether any session enabled the provider, regardless of the level and keyword values used to enable the provider.

IsEnabled(Byte, Int64)

Determines whether any session is requesting the specified event from the provider.

public:
 bool IsEnabled(System::Byte level, long keywords);
public bool IsEnabled (byte level, long keywords);
member this.IsEnabled : byte * int64 -> bool
Public Function IsEnabled (level As Byte, keywords As Long) As Boolean

Parameters

level
Byte

Level of detail included in the event.

keywords
Int64

Bit mask that specifies the event category. This mask should be the same keyword mask that is defined in the manifest for the event.

Returns

Is true if any session is requesting the specified event; otherwise, false.

Remarks

Typically, a provider does not call this method to determine whether a session requested the specified event; the provider simply writes the event, and ETW determines whether the event is logged to a session. A provider may want to call this function if the provider needs to perform extra work to generate the event. In this case, calling this function first to determine if a session requested the event or not, may save resources and time.

Applies to

IsEnabled()

Determines whether any session enabled the provider, regardless of the level and keyword values used to enable the provider.

public:
 bool IsEnabled();
public bool IsEnabled ();
member this.IsEnabled : unit -> bool
Public Function IsEnabled () As Boolean

Returns

Is true if the provider is enabled to any session; otherwise, false.

Remarks

Typically, a provider does not call this method to determine whether the provider has been enabled by a session; the provider simply writes the event, and ETW determines whether the event is logged to the session. A provider may want to call this function if the provider needs to perform extra work to generate the event. In this case, calling this function first may save resources and time.

Applies to