EventTrackingEnabledAttribute.Value Property

 

Gets the value of the Value property, which indicates whether tracking is enabled.

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

public bool Value { get; }

Property Value

Type: System.Boolean

true if tracking is enabled; otherwise, false. The default is true.

The following code example gets the value of an EventTrackingEnabled attribute's Value property.

[EventTrackingEnabled(false)]
public class EventTrackingEnabledAttribute_Value : ServicedComponent
{
    public void ValueExample()
    {
        // Get the EventTrackingEnabledAttribute applied to the class.
        EventTrackingEnabledAttribute attribute =
            (EventTrackingEnabledAttribute)Attribute.GetCustomAttribute(
            this.GetType(),
            typeof(EventTrackingEnabledAttribute),
            false);

        // Display the value of the attribute's Value property.
        Console.WriteLine("EventTrackingEnabledAttribute.Value: {0}",
            attribute.Value);
    }
}

.NET Framework
Available since 1.1
Return to top
Show: