EventSource.Write Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Écrit un événement.
Surcharges
| Nom | Description |
|---|---|
| Write(String) |
Écrit un événement sans champs, mais avec le nom et les options par défaut spécifiés. |
| Write(String, EventSourceOptions) |
Écrit un événement sans champs, mais avec le nom et les options spécifiés. |
| Write<T>(String, EventSourceOptions, Guid, Guid, T) |
Écrit un événement avec le nom, les options, l’activité associée et les données d’événement spécifiées. |
| Write<T>(String, T) |
Écrit un événement avec le nom et les données spécifiés. |
| Write<T>(String, EventSourceOptions, T) |
Écrit un événement avec le nom, les données d’événement et les options spécifiés. |
| Write<T>(String, EventSourceOptions, T) |
Écrit un événement avec le nom, les options et les données d’événement spécifiés. |
Write(String)
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
Écrit un événement sans champs, mais avec le nom et les options par défaut spécifiés.
public:
void Write(System::String ^ eventName);
public void Write(string eventName);
public void Write(string? eventName);
member this.Write : string -> unit
Public Sub Write (eventName As String)
Paramètres
- eventName
- String
Nom de l’événement à écrire.
Exceptions
eventName a la valeur null.
S’applique à
Write(String, EventSourceOptions)
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
Écrit un événement sans champs, mais avec le nom et les options spécifiés.
public:
void Write(System::String ^ eventName, System::Diagnostics::Tracing::EventSourceOptions options);
public void Write(string eventName, System.Diagnostics.Tracing.EventSourceOptions options);
public void Write(string? eventName, System.Diagnostics.Tracing.EventSourceOptions options);
member this.Write : string * System.Diagnostics.Tracing.EventSourceOptions -> unit
Public Sub Write (eventName As String, options As EventSourceOptions)
Paramètres
- eventName
- String
Nom de l’événement à écrire.
- options
- EventSourceOptions
Les options telles que le niveau, les mots clés et le code d’opération de l’événement.
Exceptions
eventName a la valeur null.
S’applique à
Write<T>(String, EventSourceOptions, Guid, Guid, T)
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
Écrit un événement avec le nom, les options, l’activité associée et les données d’événement spécifiées.
public:
generic <typename T>
void Write(System::String ^ eventName, System::Diagnostics::Tracing::EventSourceOptions % options, Guid % activityId, Guid % relatedActivityId, T % data);
public void Write<T>(string eventName, ref System.Diagnostics.Tracing.EventSourceOptions options, ref Guid activityId, ref Guid relatedActivityId, ref T data);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type")]
public void Write<T>(string? eventName, ref System.Diagnostics.Tracing.EventSourceOptions options, ref Guid activityId, ref Guid relatedActivityId, ref T data);
public void Write<T>(string? eventName, ref System.Diagnostics.Tracing.EventSourceOptions options, ref Guid activityId, ref Guid relatedActivityId, ref T data);
member this.Write : string * EventSourceOptions * Guid * Guid * 'T -> unit
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type")>]
member this.Write : string * EventSourceOptions * Guid * Guid * 'T -> unit
Public Sub Write(Of T) (eventName As String, ByRef options As EventSourceOptions, ByRef activityId As Guid, ByRef relatedActivityId As Guid, ByRef data As T)
Paramètres de type
- T
Type qui définit l’événement et ses données associées. Ce type doit être un type anonyme ou marqué avec l’attribut EventSourceAttribute .
Paramètres
- eventName
- String
Nom de l’événement.
- options
- EventSourceOptions
Options d’événement.
- activityId
- Guid
ID de l’activité associée à l’événement.
- data
- T
Données d’événement. Ce type doit être un type anonyme ou marqué avec l’attribut EventDataAttribute .
- Attributs
Remarques
Si eventName c’est nullle cas, le nom de l’événement est automatiquement dérivé des données d’événement du type T (Name) ou déterminé en fonction du nom du type T. Les propriétés d’instance publique de data seront écrites de manière récursive pour créer les champs d’événement.
S’applique à
Write<T>(String, T)
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
Écrit un événement avec le nom et les données spécifiés.
public:
generic <typename T>
void Write(System::String ^ eventName, T data);
public void Write<T>(string eventName, T data);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type")]
public void Write<T>(string? eventName, T data);
public void Write<T>(string? eventName, T data);
member this.Write : string * 'T -> unit
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type")>]
member this.Write : string * 'T -> unit
Public Sub Write(Of T) (eventName As String, data As T)
Paramètres de type
- T
Type qui définit l’événement et ses données associées. Ce type doit être un type anonyme ou marqué avec l’attribut EventSourceAttribute .
Paramètres
- eventName
- String
Nom de l’événement.
- data
- T
Données d’événement. Ce type doit être un type anonyme ou marqué avec l’attribut EventDataAttribute .
- Attributs
Remarques
Si eventName c’est nullle cas, le nom de l’événement est automatiquement dérivé des données d’événement du type T (Name) ou déterminé en fonction du nom du type T. Les propriétés d’instance publique de data seront écrites de manière récursive pour créer les champs d’événement.
S’applique à
Write<T>(String, EventSourceOptions, T)
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
Écrit un événement avec le nom, les données d’événement et les options spécifiés.
public:
generic <typename T>
void Write(System::String ^ eventName, System::Diagnostics::Tracing::EventSourceOptions options, T data);
public void Write<T>(string eventName, System.Diagnostics.Tracing.EventSourceOptions options, T data);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type")]
public void Write<T>(string? eventName, System.Diagnostics.Tracing.EventSourceOptions options, T data);
public void Write<T>(string? eventName, System.Diagnostics.Tracing.EventSourceOptions options, T data);
member this.Write : string * System.Diagnostics.Tracing.EventSourceOptions * 'T -> unit
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type")>]
member this.Write : string * System.Diagnostics.Tracing.EventSourceOptions * 'T -> unit
Public Sub Write(Of T) (eventName As String, options As EventSourceOptions, data As T)
Paramètres de type
- T
Type qui définit l’événement et ses données associées. Ce type doit être un type anonyme ou marqué avec l’attribut EventSourceAttribute .
Paramètres
- eventName
- String
Nom de l’événement.
- options
- EventSourceOptions
Options d’événement.
- data
- T
Données d’événement. Ce type doit être un type anonyme ou marqué avec l’attribut EventDataAttribute .
- Attributs
Remarques
Si eventName c’est nullle cas, le nom de l’événement est automatiquement dérivé des données d’événement du type T (Name) ou déterminé en fonction du nom du type T. Les propriétés d’instance publique de data seront écrites de manière récursive pour créer les champs d’événement.
S’applique à
Write<T>(String, EventSourceOptions, T)
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
- Source:
- TraceLoggingEventSource.cs
Écrit un événement avec le nom, les options et les données d’événement spécifiés.
public:
generic <typename T>
void Write(System::String ^ eventName, System::Diagnostics::Tracing::EventSourceOptions % options, T % data);
public void Write<T>(string eventName, ref System.Diagnostics.Tracing.EventSourceOptions options, ref T data);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type")]
public void Write<T>(string? eventName, ref System.Diagnostics.Tracing.EventSourceOptions options, ref T data);
public void Write<T>(string? eventName, ref System.Diagnostics.Tracing.EventSourceOptions options, ref T data);
member this.Write : string * EventSourceOptions * 'T -> unit
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("EventSource will serialize the whole object graph. Trimmer will not safely handle this case because properties may be trimmed. This can be suppressed if the object is a primitive type")>]
member this.Write : string * EventSourceOptions * 'T -> unit
Public Sub Write(Of T) (eventName As String, ByRef options As EventSourceOptions, ByRef data As T)
Paramètres de type
- T
Type qui définit l’événement et ses données associées. Ce type doit être un type anonyme ou marqué avec l’attribut EventSourceAttribute .
Paramètres
- eventName
- String
Nom de l’événement.
- options
- EventSourceOptions
Options d’événement.
- data
- T
Données d’événement. Ce type doit être un type anonyme ou marqué avec l’attribut EventDataAttribute .
- Attributs
Remarques
Si eventName c’est nullle cas, le nom de l’événement est automatiquement dérivé des données d’événement du type T (Name) ou déterminé en fonction du nom du type T. Les propriétés d’instance publique de data seront écrites de manière récursive pour créer les champs d’événement.