Freigeben über


EventTrackingEnabledAttribute.Value-Eigenschaft

Ruft den Wert der Value-Eigenschaft ab, die angibt, ob die Überwachung aktiviert ist.

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

Syntax

'Declaration
Public ReadOnly Property Value As Boolean
'Usage
Dim instance As EventTrackingEnabledAttribute
Dim value As Boolean

value = instance.Value
public bool Value { get; }
public:
property bool Value {
    bool get ();
}
/** @property */
public boolean get_Value ()
public function get Value () : boolean

Eigenschaftenwert

true, wenn die Überwachung aktiviert ist, andernfalls false. Der Standardwert ist true.

Beispiel

Im folgenden Codebeispiel wird der Wert der Value-Eigenschaft eines EventTrackingEnabled-Attributs abgerufen.

<EventTrackingEnabled(False)>  _
Public Class EventTrackingEnabledAttribute_Value
    Inherits ServicedComponent
    
    Public Sub ValueExample() 
        ' Get the EventTrackingEnabledAttribute applied to the class.
        Dim attribute As EventTrackingEnabledAttribute = CType(Attribute.GetCustomAttribute(Me.GetType(), GetType(EventTrackingEnabledAttribute), False), EventTrackingEnabledAttribute)
        
        ' Display the value of the attribute's Value property.
        MsgBox("EventTrackingEnabledAttribute.Value: " & attribute.Value)
    
    End Sub 'ValueExample
End Class 'EventTrackingEnabledAttribute_Value
[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);
    }
}
/** @attribute EventTrackingEnabled(false)
 */
public class EventTrackingEnabledAttribute_Value extends ServicedComponent
{
    public void ValueExample()
    {
        // Get the EventTrackingEnabledAttribute applied to the class.
        EventTrackingEnabledAttribute attribute = 
            (EventTrackingEnabledAttribute)(Attribute.GetCustomAttribute(
            this.GetType(), EventTrackingEnabledAttribute.class.ToType(),
            false));

        // Display the value of the attribute's Value property.
        Console.WriteLine("EventTrackingEnabledAttribute.Value: {0}",
            System.Convert.ToString(attribute.get_Value()));
    } //ValueExample
} //EventTrackingEnabledAttribute_Value

.NET Framework-Sicherheit

  • Volle Vertrauenswürdigkeit für den unmittelbaren Aufrufer. Dieser Member kann von nur teilweise vertrauenswürdigem Code nicht verwendet werden. Weitere Informationen finden Sie unter .

Plattformen

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

EventTrackingEnabledAttribute-Klasse
EventTrackingEnabledAttribute-Member
System.EnterpriseServices-Namespace