EventSource EventSource EventSource EventSource Class

Definición

Proporciona la capacidad de crear eventos de seguimiento de eventos para Windows (ETW).Provides the ability to create events for event tracing for Windows (ETW).

public ref class EventSource : IDisposable
public class EventSource : IDisposable
type EventSource = class
    interface IDisposable
Public Class EventSource
Implements IDisposable
Herencia
EventSourceEventSourceEventSourceEventSource
Implementaciones

Ejemplos

En el ejemplo siguiente se muestra una implementación simple EventSource de la clase.The following example shows a simple implementation of the EventSource class.

using System.Diagnostics.Tracing;
using System.Collections.Generic;

namespace Demo1
{
    class MyCompanyEventSource : EventSource
    {
        public static MyCompanyEventSource Log = new MyCompanyEventSource();

        public void Startup() { WriteEvent(1); }
        public void OpenFileStart(string fileName) { WriteEvent(2, fileName); }
        public void OpenFileStop() { WriteEvent(3); }
    }

    class Program
    {
        static void Main(string[] args)
        {
            string name = MyCompanyEventSource.GetName(typeof(MyCompanyEventSource));
            IEnumerable<EventSource> eventSources = MyCompanyEventSource.GetSources();
            MyCompanyEventSource.Log.Startup();
            // ...
            MyCompanyEventSource.Log.OpenFileStart("SomeFile");
            // ...
            MyCompanyEventSource.Log.OpenFileStop();
        }
    }
}
Imports System.Diagnostics.Tracing

Class MyCompanyEventSource
    Inherits EventSource
    Public Shared Log As New MyCompanyEventSource()

    Public Sub Startup()
        WriteEvent(1)
    End Sub

    Public Sub OpenFileStart(ByVal fileName As String)
        WriteEvent(2, fileName)
    End Sub

    Public Sub OpenFileStop()
        WriteEvent(3)
    End Sub
End Class

Class Program

    Shared Sub Main(ByVal args() As String)
        MyCompanyEventSource.Log.Startup()
        ' ...
        MyCompanyEventSource.Log.OpenFileStart("SomeFile")
        ' ...
        MyCompanyEventSource.Log.OpenFileStop()

    End Sub
End Class

En el ejemplo siguiente se muestra una implementación más compleja EventSource de la clase.The following example shows a more complex implementation of the EventSource class.

using System;
using System.Diagnostics.Tracing;

namespace Demo2
{
    enum MyColor { Red, Yellow, Blue };

    [EventSource(Name = "MyCompany")]
    class MyCompanyEventSource : EventSource
    {
        public class Keywords
        {
            public const EventKeywords Page = (EventKeywords)1;
            public const EventKeywords DataBase = (EventKeywords)2;
            public const EventKeywords Diagnostic = (EventKeywords)4;
            public const EventKeywords Perf = (EventKeywords)8;
        }

        public class Tasks
        {
            public const EventTask Page = (EventTask)1;
            public const EventTask DBQuery = (EventTask)2;
        }

        [Event(1, Message = "Application Failure: {0}", Level = EventLevel.Error, Keywords = Keywords.Diagnostic)]
        public void Failure(string message) { WriteEvent(1, message); }

        [Event(2, Message = "Starting up.", Keywords = Keywords.Perf, Level = EventLevel.Informational)]
        public void Startup() { WriteEvent(2); }

        [Event(3, Message = "loading page {1} activityID={0}", Opcode = EventOpcode.Start, 
            Task = Tasks.Page, Keywords = Keywords.Page, Level = EventLevel.Informational)]
        public void PageStart(int ID, string url) { if (IsEnabled()) WriteEvent(3, ID, url); }

        [Event(4, Opcode = EventOpcode.Stop, Task = Tasks.Page, Keywords = Keywords.Page, Level = EventLevel.Informational)]
        public void PageStop(int ID) { if (IsEnabled()) WriteEvent(4, ID); }

        [Event(5, Opcode = EventOpcode.Start, Task = Tasks.DBQuery, Keywords = Keywords.DataBase, Level = EventLevel.Informational)]
        public void DBQueryStart(string sqlQuery) { WriteEvent(5, sqlQuery); }

        [Event(6, Opcode = EventOpcode.Stop, Task = Tasks.DBQuery, Keywords = Keywords.DataBase, Level = EventLevel.Informational)]
        public void DBQueryStop() { WriteEvent(6); }

        [Event(7, Level = EventLevel.Verbose, Keywords = Keywords.DataBase)]
        public void Mark(int ID) { if (IsEnabled()) WriteEvent(7, ID); }

        [Event(8)]
        public void LogColor(MyColor color) { WriteEvent(8, (int) color); }

        public static MyCompanyEventSource Log = new MyCompanyEventSource();
    }

    class Program
    {
        static void Main(string[] args)
        {
            MyCompanyEventSource.Log.Startup();
            Console.WriteLine("Starting up");

            MyCompanyEventSource.Log.DBQueryStart("Select * from MYTable");
            var url = "http://localhost";
            for (int i = 0; i < 10; i++)
            {
                MyCompanyEventSource.Log.PageStart(i, url);
                MyCompanyEventSource.Log.Mark(i);
                MyCompanyEventSource.Log.PageStop(i);
            }
            MyCompanyEventSource.Log.DBQueryStop();
            MyCompanyEventSource.Log.LogColor(MyColor.Blue);

            MyCompanyEventSource.Log.Failure("This is a failure 1");
            MyCompanyEventSource.Log.Failure("This is a failure 2");
            MyCompanyEventSource.Log.Failure("This is a failure 3");
        }
    }
}
Imports System.Diagnostics.Tracing


Enum MyColor
    Red
    Yellow
    Blue
End Enum 'MyColor 
<EventSource(Name:="MyCompany")> _
Class MyCompanyEventSource
    Inherits EventSource

    Public Class Keywords
        Public Const Page As EventKeywords = CType(1, EventKeywords)
        Public Const DataBase As EventKeywords = CType(2, EventKeywords)
        Public Const Diagnostic As EventKeywords = CType(4, EventKeywords)
        Public Const Perf As EventKeywords = CType(8, EventKeywords)
    End Class

    Public Class Tasks
        Public Const Page As EventTask = CType(1, EventTask)
        Public Const DBQuery As EventTask = CType(1, EventTask)
    End Class

    <[Event](1, Message:="Application Failure: {0}", Level:=EventLevel.Error, Keywords:=Keywords.Diagnostic)> _
    Public Sub Failure(ByVal message As String)
        WriteEvent(1, message)
    End Sub

    <[Event](2, Message:="Starting up.", Keywords:=Keywords.Perf, Level:=EventLevel.Informational)> _
    Public Sub Startup()
        WriteEvent(2)
    End Sub

    <[Event](3, Message:="loading page {1} activityID={0}", Opcode:=EventOpcode.Start, Task:=Tasks.Page, Keywords:=Keywords.Page, Level:=EventLevel.Informational)> _
    Public Sub PageStart(ByVal ID As Integer, ByVal url As String)
        If IsEnabled() Then
            WriteEvent(3, ID, url)
        End If
    End Sub

    <[Event](4, Opcode:=EventOpcode.Stop, Task:=Tasks.Page, Keywords:=Keywords.Page, Level:=EventLevel.Informational)> _
    Public Sub PageStop(ByVal ID As Integer)
        If IsEnabled() Then
            WriteEvent(4, ID)
        End If
    End Sub

    <[Event](5, Opcode:=EventOpcode.Start, Task:=Tasks.DBQuery, Keywords:=Keywords.DataBase, Level:=EventLevel.Informational)> _
    Public Sub DBQueryStart(ByVal sqlQuery As String)
        WriteEvent(5, sqlQuery)
    End Sub

    <[Event](6, Opcode:=EventOpcode.Stop, Task:=Tasks.DBQuery, Keywords:=Keywords.DataBase, Level:=EventLevel.Informational)> _
    Public Sub DBQueryStop()
        WriteEvent(6)
    End Sub

    <[Event](7, Level:=EventLevel.Verbose, Keywords:=Keywords.DataBase)> _
    Public Sub Mark(ByVal ID As Integer)
        If IsEnabled() Then
            WriteEvent(7, ID)
        End If
    End Sub

    <[Event](8)> _
    Public Sub LogColor(ByVal color As MyColor)
        WriteEvent(8, Fix(color))
    End Sub
    Public Shared Log As New MyCompanyEventSource()
End Class


Class Program

    Shared Sub Main(ByVal args() As String)
        MyCompanyEventSource.Log.Startup()
        Console.WriteLine("Starting up")
        MyCompanyEventSource.Log.DBQueryStart("Select * from MYTable")
        Dim url As String = "http:'localhost"
        Dim i As Integer
        For i = 0 To 9
            MyCompanyEventSource.Log.PageStart(i, url)
            MyCompanyEventSource.Log.Mark(i)
            MyCompanyEventSource.Log.PageStop(i)
        Next i
        MyCompanyEventSource.Log.DBQueryStop()
        MyCompanyEventSource.Log.LogColor(MyColor.Blue)

        MyCompanyEventSource.Log.Failure("This is a failure 1")
        MyCompanyEventSource.Log.Failure("This is a failure 2")
        MyCompanyEventSource.Log.Failure("This is a failure 3")
    End Sub
End Class

Comentarios

Esta clase está pensada para ser heredada por una clase de usuario que proporcione eventos específicos que se usarán para ETW.This class is intended to be inherited by a user class that provides specific events to be used for ETW. Se EventSource.WriteEvent llama a los métodos para registrar los eventos.The EventSource.WriteEvent methods are called to log the events.

Importante

Este tipo implementa la interfaz IDisposable.This type implements the IDisposable interface. Cuando haya terminado de utilizar el tipo, debe desecharlo directa o indirectamente.When you have finished using the type, you should dispose of it either directly or indirectly. Para eliminar el tipo directamente, llame a su método Dispose en un bloque try/catch.To dispose of the type directly, call its Dispose method in a try/catch block. Para deshacerse de él indirectamente, use una construcción de lenguaje como using (en C#) o Using (en Visual Basic).To dispose of it indirectly, use a language construct such as using (in C#) or Using (in Visual Basic). Para más información, vea la sección "Uso de objetos que implementan IDisposable" en el tema de la interfaz IDisposable.For more information, see the "Using an Object that Implements IDisposable" section in the IDisposable interface topic.

La funcionalidad básica de EventSource es suficiente para la mayoría de las aplicaciones.The basic functionality of EventSource is sufficient for most applications. Si desea tener más control sobre el manifiesto de ETW que se crea, puede aplicar el EventAttribute atributo a los métodos.If you want more control over the ETW manifest that is created, you can apply the EventAttribute attribute to the methods. En el caso de las aplicaciones de origen de eventos avanzadas, es posible interceptar los comandos que se envían al origen de eventos derivado y cambiar el filtrado, o hacer que el heredero realice acciones (como el volcado de una estructura de datos).For advanced event source applications, it is possible to intercept the commands being sent to the derived event source and change the filtering, or to cause actions (such as dumping a data structure) to be performed by the inheritor. Un origen de eventos se puede activar con controladores ETW de Windows, como la herramienta Logman, inmediatamente.An event source can be activated with Windows ETW controllers, such as the Logman tool, immediately. También es posible controlar e interceptar el distribuidor de datos mediante programación.It is also possible to programmatically control and intercept the data dispatcher. La EventListener clase proporciona funcionalidad adicional.The EventListener class provides additional functionality.

A .NET Framework 4.6.NET Framework 4.6partir de EventSource , proporciona compatibilidad con canales y algunas de las reglas de validación de origen de eventos se han relajado.Starting with .NET Framework 4.6.NET Framework 4.6, EventSource provides channel support and some of the event source validation rules have been relaxed. Esto significa que:This means:

  • EventSourcelos tipos ahora pueden implementar interfaces.EventSource types may now implement interfaces. Esto permite el uso de tipos de origen de eventos en sistemas de registro avanzados que usan interfaces para definir un destino de registro común.This enables the use of event source types in advanced logging systems that use interfaces to define a common logging target.

  • Se ha introducido el concepto de tipo de origen de eventos de utilidad.The concept of a utility event source type has been introduced. Esta característica permite compartir código en varios tipos de orígenes de eventos de un proyecto para habilitar escenarios como WriteEvent sobrecargas optimizadas.This feature enables sharing code across multiple event source types in a project to enable scenarios such as optimized WriteEvent overloads.

Para obtener una versión de EventSource la clase que proporcione características como compatibilidad con canales como .NET Framework 4.5.1.NET Framework 4.5.1 destino o versiones anteriores, vea biblioteca EventSource de Microsoft 1.0.16.For a version of the EventSource class that provides features such as channel support you are targeting .NET Framework 4.5.1.NET Framework 4.5.1 or earlier, see Microsoft EventSource Library 1.0.16.

Constructores

EventSource() EventSource() EventSource() EventSource()

Crea una nueva instancia de la clase EventSource.Creates a new instance of the EventSource class.

EventSource(Boolean) EventSource(Boolean) EventSource(Boolean) EventSource(Boolean)

Crea una nueva instancia de la clase EventSource y especifica si se inicia una excepción cuando se produce un error en el código subyacente de Windows.Creates a new instance of the EventSource class and specifies whether to throw an exception when an error occurs in the underlying Windows code.

EventSource(EventSourceSettings) EventSource(EventSourceSettings) EventSource(EventSourceSettings) EventSource(EventSourceSettings)

Crea una instancia de la clase EventSource con las opciones de configuración especificadas.Creates a new instance of the EventSource class with the specified configuration settings.

EventSource(EventSourceSettings, String[]) EventSource(EventSourceSettings, String[]) EventSource(EventSourceSettings, String[]) EventSource(EventSourceSettings, String[])

Inicializa una nueva instancia del EventSource para su uso con eventos que no forman parte de un contrato y contengan las características y rasgos especificados.Initializes a new instance of the EventSource to be used with non-contract events that contains the specified settings and traits.

EventSource(String) EventSource(String) EventSource(String) EventSource(String)

Crea una nueva instancia de la clase EventSource con el nombre especificado.Creates a new instance of the EventSource class with the specified name.

EventSource(String, EventSourceSettings) EventSource(String, EventSourceSettings) EventSource(String, EventSourceSettings) EventSource(String, EventSourceSettings)

Crea una nueva instancia de la clase EventSource con el nombre y configuración especificados.Creates a new instance of the EventSource class with the specified name and settings.

EventSource(String, EventSourceSettings, String[]) EventSource(String, EventSourceSettings, String[]) EventSource(String, EventSourceSettings, String[]) EventSource(String, EventSourceSettings, String[])

Crea una instancia de la clase EventSource con las opciones de configuración especificadas.Creates a new instance of the EventSource class with the specified configuration settings.

Propiedades

ConstructionException ConstructionException ConstructionException ConstructionException

Obtiene cualquier excepción que se produjo durante la construcción de un origen de eventos.Gets any exception that was thrown during the construction of the event source.

CurrentThreadActivityId CurrentThreadActivityId CurrentThreadActivityId CurrentThreadActivityId

Obtiene el id. de actividad del subproceso actual.Gets the activity ID of the current thread.

Guid Guid Guid Guid

Identificador único para el origen de eventos.The unique identifier for the event source.

Name Name Name Name

Nombre descriptivo de la clase que se deriva del origen de eventos.The friendly name of the class that is derived from the event source.

Settings Settings Settings Settings

Obtiene la configuración aplicada a este origen del evento.Gets the settings applied to this event source.

Métodos

Dispose() Dispose() Dispose() Dispose()

Libera todos los recursos usados por la instancia actual de la clase EventSource.Releases all resources used by the current instance of the EventSource class.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Libera los recursos no administrados utilizados por la clase EventSource y, de forma opcional, libera los recursos administrados.Releases the unmanaged resources used by the EventSource class and optionally releases the managed resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

(Inherited from Object)
Finalize() Finalize() Finalize() Finalize()

Permite que el objeto EventSource intente liberar recursos y realizar otras operaciones de limpieza antes de que la recolección de elementos no utilizados lo reclame.Allows the EventSource object to attempt to free resources and perform other cleanup operations before the object is reclaimed by garbage collection.

GenerateManifest(Type, String) GenerateManifest(Type, String) GenerateManifest(Type, String) GenerateManifest(Type, String)

Devuelve una cadena del manifiesto XML asociado al origen de eventos actual.Returns a string of the XML manifest that is associated with the current event source.

GenerateManifest(Type, String, EventManifestOptions) GenerateManifest(Type, String, EventManifestOptions) GenerateManifest(Type, String, EventManifestOptions) GenerateManifest(Type, String, EventManifestOptions)

Devuelve una cadena del manifiesto XML asociado al origen de eventos actual.Returns a string of the XML manifest that is associated with the current event source.

GetGuid(Type) GetGuid(Type) GetGuid(Type) GetGuid(Type)

Obtiene el identificador único de esta implementación del origen del evento.Gets the unique identifier for this implementation of the event source.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Inherited from Object)
GetName(Type) GetName(Type) GetName(Type) GetName(Type)

Obtiene el nombre descriptivo del origen del evento.Gets the friendly name of the event source.

GetSources() GetSources() GetSources() GetSources()

Obtiene una instantánea de todos los orígenes de eventos para el dominio de aplicación.Gets a snapshot of all the event sources for the application domain.

GetTrait(String) GetTrait(String) GetTrait(String) GetTrait(String)

Obtiene el valor de rasgo asociado a la clave especificada.Gets the trait value associated with the specified key.

GetType() GetType() GetType() GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Inherited from Object)
IsEnabled() IsEnabled() IsEnabled() IsEnabled()

Determina si el origen de eventos actual está habilitado.Determines whether the current event source is enabled.

IsEnabled(EventLevel, EventKeywords) IsEnabled(EventLevel, EventKeywords) IsEnabled(EventLevel, EventKeywords) IsEnabled(EventLevel, EventKeywords)

Determina si el origen de eventos actual que tiene el nivel y la palabra clave especificados está habilitado.Determines whether the current event source that has the specified level and keyword is enabled.

IsEnabled(EventLevel, EventKeywords, EventChannel) IsEnabled(EventLevel, EventKeywords, EventChannel) IsEnabled(EventLevel, EventKeywords, EventChannel) IsEnabled(EventLevel, EventKeywords, EventChannel)

Determina si el origen del evento actual está habilitado para eventos con el nivel, las palabras clave y el canal especificados.Determines whether the current event source is enabled for events with the specified level, keywords and channel.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficial del objeto Object actual.Creates a shallow copy of the current Object.

(Inherited from Object)
OnEventCommand(EventCommandEventArgs) OnEventCommand(EventCommandEventArgs) OnEventCommand(EventCommandEventArgs) OnEventCommand(EventCommandEventArgs)

Se llama cuando el origen de eventos actual es actualizado por el controlador.Called when the current event source is updated by the controller.

SendCommand(EventSource, EventCommand, IDictionary<String,String>) SendCommand(EventSource, EventCommand, IDictionary<String,String>) SendCommand(EventSource, EventCommand, IDictionary<String,String>) SendCommand(EventSource, EventCommand, IDictionary<String,String>)

Envía un comando a un origen de eventos especificado.Sends a command to a specified event source.

SetCurrentThreadActivityId(Guid) SetCurrentThreadActivityId(Guid) SetCurrentThreadActivityId(Guid) SetCurrentThreadActivityId(Guid)

Establece el identificador de actividad del subproceso actual.Sets the activity ID on the current thread.

SetCurrentThreadActivityId(Guid, Guid) SetCurrentThreadActivityId(Guid, Guid) SetCurrentThreadActivityId(Guid, Guid) SetCurrentThreadActivityId(Guid, Guid)

Establece el identificador de actividad en el subproceso actual y devuelve el identificador de la actividad anterior.Sets the activity ID on the current thread, and returns the previous activity ID.

ToString() ToString() ToString() ToString()

Obtiene una representación de cadena de la instancia del origen de eventos actual.Obtains a string representation of the current event source instance.

Write(String) Write(String) Write(String) Write(String)

Escribe un evento sin campos, pero con el nombre especificado y las opciones predeterminadas.Writes an event without fields, but with the specified name and default options.

Write(String, EventSourceOptions) Write(String, EventSourceOptions) Write(String, EventSourceOptions) Write(String, EventSourceOptions)

Escribe un evento sin campos, pero con el nombre y las opciones especificados.Writes an event without fields, but with the specified name and options.

Write<T>(String, EventSourceOptions, Guid, Guid, T) Write<T>(String, EventSourceOptions, Guid, Guid, T) Write<T>(String, EventSourceOptions, Guid, Guid, T) Write<T>(String, EventSourceOptions, Guid, Guid, T)

Escribe un evento con el nombre, las opciones, la actividad relacionada y los datos de evento especificados.Writes an event with the specified name, options, related activity and event data.

Write<T>(String, EventSourceOptions, T) Write<T>(String, EventSourceOptions, T) Write<T>(String, EventSourceOptions, T) Write<T>(String, EventSourceOptions, T)

Escribe un evento con el nombre, las opciones y los datos de evento especificados.Writes an event with the specified name, options and event data.

Write<T>(String, EventSourceOptions, T) Write<T>(String, EventSourceOptions, T) Write<T>(String, EventSourceOptions, T) Write<T>(String, EventSourceOptions, T)

Escribe un evento con el nombre, los datos de evento y las opciones especificados.Writes an event with the specified name, event data and options.

Write<T>(String, T) Write<T>(String, T) Write<T>(String, T) Write<T>(String, T)

Escribe un evento con el nombre y los datos especificados.Writes an event with the specified name and data.

WriteEvent(Int32) WriteEvent(Int32) WriteEvent(Int32) WriteEvent(Int32)

Escribe un evento con el identificador de eventos proporcionado.Writes an event by using the provided event identifier.

WriteEvent(Int32, Byte[]) WriteEvent(Int32, Byte[]) WriteEvent(Int32, Byte[]) WriteEvent(Int32, Byte[])

Escribe un evento con el identificador de eventos y el argumento de matriz de bytes especificados.Writes an event by using the provided event identifier and byte array argument.

WriteEvent(Int32, Int32) WriteEvent(Int32, Int32) WriteEvent(Int32, Int32) WriteEvent(Int32, Int32)

Escribe un evento con el identificador de eventos y el argumento entero de 32 bits especificados.Writes an event by using the provided event identifier and 32-bit integer argument.

WriteEvent(Int32, Int32, Int32) WriteEvent(Int32, Int32, Int32) WriteEvent(Int32, Int32, Int32) WriteEvent(Int32, Int32, Int32)

Escribe un evento con el identificador de eventos y los argumentos enteros de 32 bits especificados.Writes an event by using the provided event identifier and 32-bit integer arguments.

WriteEvent(Int32, Int32, Int32, Int32) WriteEvent(Int32, Int32, Int32, Int32) WriteEvent(Int32, Int32, Int32, Int32) WriteEvent(Int32, Int32, Int32, Int32)

Escribe un evento con el identificador de eventos y los argumentos enteros de 32 bits especificados.Writes an event by using the provided event identifier and 32-bit integer arguments.

WriteEvent(Int32, Int32, String) WriteEvent(Int32, Int32, String) WriteEvent(Int32, Int32, String) WriteEvent(Int32, Int32, String)

Escribe un evento con el identificador de eventos y los argumentos de cadena y enteros de 32 bits especificados.Writes an event by using the provided event identifier and 32-bit integer and string arguments.

WriteEvent(Int32, Int64) WriteEvent(Int32, Int64) WriteEvent(Int32, Int64) WriteEvent(Int32, Int64)

Escribe un evento con el identificador de eventos y el argumento entero de 64 bits especificados.Writes an event by using the provided event identifier and 64-bit integer argument.

WriteEvent(Int32, Int64, Byte[]) WriteEvent(Int32, Int64, Byte[]) WriteEvent(Int32, Int64, Byte[]) WriteEvent(Int32, Int64, Byte[])

Escribe los datos del evento con el identificador y los argumentos de matriz de bytes y enteros de 64 bits especificados.Writes the event data using the specified identifier and 64-bit integer and byte array arguments.

WriteEvent(Int32, Int64, Int64) WriteEvent(Int32, Int64, Int64) WriteEvent(Int32, Int64, Int64) WriteEvent(Int32, Int64, Int64)

Escribe un evento con el identificador de eventos y los argumentos de 64 bits especificados.Writes an event by using the provided event identifier and 64-bit arguments.

WriteEvent(Int32, Int64, Int64, Int64) WriteEvent(Int32, Int64, Int64, Int64) WriteEvent(Int32, Int64, Int64, Int64) WriteEvent(Int32, Int64, Int64, Int64)

Escribe un evento con el identificador de eventos y los argumentos de 64 bits especificados.Writes an event by using the provided event identifier and 64-bit arguments.

WriteEvent(Int32, Int64, String) WriteEvent(Int32, Int64, String) WriteEvent(Int32, Int64, String) WriteEvent(Int32, Int64, String)

Escribe un evento con el identificador de eventos y los argumentos de cadena y enteros de 64 bits especificados.Writes an event by using the provided event identifier and 64-bit integer, and string arguments.

WriteEvent(Int32, Object[]) WriteEvent(Int32, Object[]) WriteEvent(Int32, Object[]) WriteEvent(Int32, Object[])

Escribe un evento con el identificador de eventos y la matriz de argumentos especificados.Writes an event by using the provided event identifier and array of arguments.

WriteEvent(Int32, String) WriteEvent(Int32, String) WriteEvent(Int32, String) WriteEvent(Int32, String)

Escribe un evento con el identificador de eventos y el argumento de cadena especificados.Writes an event by using the provided event identifier and string argument.

WriteEvent(Int32, String, Int32) WriteEvent(Int32, String, Int32) WriteEvent(Int32, String, Int32) WriteEvent(Int32, String, Int32)

Escribe un evento con el identificador de eventos y los argumentos especificados.Writes an event by using the provided event identifier and arguments.

WriteEvent(Int32, String, Int32, Int32) WriteEvent(Int32, String, Int32, Int32) WriteEvent(Int32, String, Int32, Int32) WriteEvent(Int32, String, Int32, Int32)

Escribe un evento con el identificador de eventos y los argumentos especificados.Writes an event by using the provided event identifier and arguments.

WriteEvent(Int32, String, Int64) WriteEvent(Int32, String, Int64) WriteEvent(Int32, String, Int64) WriteEvent(Int32, String, Int64)

Escribe un evento con el identificador de eventos y los argumentos especificados.Writes an event by using the provided event identifier and arguments.

WriteEvent(Int32, String, String) WriteEvent(Int32, String, String) WriteEvent(Int32, String, String) WriteEvent(Int32, String, String)

Escribe un evento con el identificador de eventos y los argumentos de cadena especificados.Writes an event by using the provided event identifier and string arguments.

WriteEvent(Int32, String, String, String) WriteEvent(Int32, String, String, String) WriteEvent(Int32, String, String, String) WriteEvent(Int32, String, String, String)

Escribe un evento con el identificador de eventos y los argumentos de cadena especificados.Writes an event by using the provided event identifier and string arguments.

WriteEventCore(Int32, Int32, EventSource+EventData*) WriteEventCore(Int32, Int32, EventSource+EventData*) WriteEventCore(Int32, Int32, EventSource+EventData*) WriteEventCore(Int32, Int32, EventSource+EventData*)

Crea una nueva sobrecarga de WriteEvent usando el identificador de eventos y los datos de eventos proporcionados.Creates a new WriteEvent overload by using the provided event identifier and event data.

WriteEventWithRelatedActivityId(Int32, Guid, Object[]) WriteEventWithRelatedActivityId(Int32, Guid, Object[]) WriteEventWithRelatedActivityId(Int32, Guid, Object[]) WriteEventWithRelatedActivityId(Int32, Guid, Object[])

Escribe un evento que indica que la actividad actual se relaciona con otra actividad.Writes an event that indicates that the current activity is related to another activity.

WriteEventWithRelatedActivityIdCore(Int32, Guid*, Int32, EventSource+EventData*) WriteEventWithRelatedActivityIdCore(Int32, Guid*, Int32, EventSource+EventData*) WriteEventWithRelatedActivityIdCore(Int32, Guid*, Int32, EventSource+EventData*) WriteEventWithRelatedActivityIdCore(Int32, Guid*, Int32, EventSource+EventData*)

Escribe un evento que indica que la actividad actual se relaciona con otra actividad.Writes an event that indicates that the current activity is related to another activity.

Eventos

EventCommandExecuted EventCommandExecuted EventCommandExecuted EventCommandExecuted

Se produce cuando un comando proviene de un agente de escucha de eventos.Occurs when a command comes from an event listener.

Se aplica a

Seguridad para subprocesos

Este tipo es seguro para la ejecución de subprocesos.This type is thread safe.