EventTrackingEnabledAttribute Constructors

Definition

Initializes a new instance of the EventTrackingEnabledAttribute class.

Overloads

EventTrackingEnabledAttribute()

Initializes a new instance of the EventTrackingEnabledAttribute class, enabling event tracking.

EventTrackingEnabledAttribute(Boolean)

Initializes a new instance of the EventTrackingEnabledAttribute class, optionally disabling event tracking.

EventTrackingEnabledAttribute()

Initializes a new instance of the EventTrackingEnabledAttribute class, enabling event tracking.

C#
public EventTrackingEnabledAttribute();

Examples

The following code example creates a new EventTrackingEnabledAttribute.

C#
[EventTrackingEnabled]
public class EventTrackingEnabledAttribute_Ctor : ServicedComponent
{
}

Remarks

The parameterless constructor enables event tracking.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

EventTrackingEnabledAttribute(Boolean)

Initializes a new instance of the EventTrackingEnabledAttribute class, optionally disabling event tracking.

C#
public EventTrackingEnabledAttribute(bool val);

Parameters

val
Boolean

true to enable event tracking; otherwise, false.

Examples

The following code example creates a new EventTrackingEnabledAttribute.

C#
[EventTrackingEnabled(false)]
public class EventTrackingEnabledAttribute_Ctor_Bool : ServicedComponent
{
}

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1