EventTrackingEnabledAttribute Clase
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Habilita el seguimiento de eventos para un componente. Esta clase no puede heredarse.
public ref class EventTrackingEnabledAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Class, Inherited=true)]
[System.Runtime.InteropServices.ComVisible(false)]
public sealed class EventTrackingEnabledAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class, Inherited=true)>]
[<System.Runtime.InteropServices.ComVisible(false)>]
type EventTrackingEnabledAttribute = class
inherit Attribute
Public NotInheritable Class EventTrackingEnabledAttribute
Inherits Attribute
- Herencia
- Atributos
En el ejemplo de código siguiente se muestra el uso del EventTrackingEnabledAttribute tipo .
using System;
using System.EnterpriseServices;
using System.Reflection;
// References:
// System.EnterpriseServices
[EventTrackingEnabled]
public class EventTrackingEnabledAttribute_Ctor : ServicedComponent
{
}
[EventTrackingEnabled(false)]
public class EventTrackingEnabledAttribute_Ctor_Bool : ServicedComponent
{
}
[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);
}
}
Imports System.EnterpriseServices
Imports System.Reflection
' References:
' System.EnterpriseServices
<EventTrackingEnabled()> _
Public Class EventTrackingEnabledAttribute_Ctor
Inherits ServicedComponent
End Class
<EventTrackingEnabled(False)> _
Public Class EventTrackingEnabledAttribute_Ctor_Bool
Inherits ServicedComponent
End Class
<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
End Class
Para obtener más información sobre el uso de atributos, vea Atributos.
Event |
Inicializa una nueva instancia de la clase EventTrackingEnabledAttribute, y habilita el seguimiento de eventos. |
Event |
Inicializa una nueva instancia de la clase EventTrackingEnabledAttribute, y, opcionalmente, deshabilita el seguimiento de eventos. |
Type |
Cuando se implementa en una clase derivada, obtiene un identificador único para este Attribute. (Heredado de Attribute) |
Value |
Obtiene el valor de la propiedad Value, que indica si el seguimiento está habilitado. |
Equals(Object) |
Devuelve un valor que indica si esta instancia es igual que un objeto especificado. (Heredado de Attribute) |
Get |
Devuelve el código hash de esta instancia. (Heredado de Attribute) |
Get |
Obtiene el Type de la instancia actual. (Heredado de Object) |
Is |
Si se reemplaza en una clase derivada, indica si el valor de esta instancia es el valor predeterminado de la clase derivada. (Heredado de Attribute) |
Match(Object) |
Cuando se invalida en una clase derivada, devuelve un valor que indica si esta instancia es igual a un objeto especificado. (Heredado de Attribute) |
Memberwise |
Crea una copia superficial del Object actual. (Heredado de Object) |
To |
Devuelve una cadena que representa el objeto actual. (Heredado de Object) |
_Attribute. |
Asigna un conjunto de nombres a un conjunto correspondiente de identificadores de envío. (Heredado de Attribute) |
_Attribute. |
Obtiene la información de tipos de un objeto, que puede utilizarse para obtener la información de tipos de una interfaz. (Heredado de Attribute) |
_Attribute. |
Recupera el número de interfaces de información de tipo que proporciona un objeto (0 ó 1). (Heredado de Attribute) |
_Attribute. |
Proporciona acceso a las propiedades y los métodos expuestos por un objeto. (Heredado de Attribute) |
Producto | Versiones |
---|---|
.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 |
Comentarios de .NET
.NET es un proyecto de código abierto. Seleccione un vínculo para proporcionar comentarios: