EventSource.Write Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Zapisuje zdarzenie.
Przeciążenia
| Nazwa | Opis |
|---|---|
| Write(String) |
Zapisuje zdarzenie bez pól, ale z określoną nazwą i opcjami domyślnymi. |
| Write(String, EventSourceOptions) |
Zapisuje zdarzenie bez pól, ale z określoną nazwą i opcjami. |
| Write<T>(String, EventSourceOptions, Guid, Guid, T) |
Zapisuje zdarzenie o określonej nazwie, opcjach, powiązanych działaniach i danych zdarzenia. |
| Write<T>(String, T) |
Zapisuje zdarzenie o określonej nazwie i danych. |
| Write<T>(String, EventSourceOptions, T) |
Zapisuje zdarzenie o określonej nazwie, danych zdarzenia i opcjach. |
| Write<T>(String, EventSourceOptions, T) |
Zapisuje zdarzenie o określonej nazwie, opcjach i danych zdarzenia. |
Write(String)
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
Zapisuje zdarzenie bez pól, ale z określoną nazwą i opcjami domyślnymi.
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)
Parametry
- eventName
- String
Nazwa zdarzenia do zapisania.
Wyjątki
Parametr eventName ma wartość null.
Dotyczy
Write(String, EventSourceOptions)
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
Zapisuje zdarzenie bez pól, ale z określoną nazwą i opcjami.
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)
Parametry
- eventName
- String
Nazwa zdarzenia do zapisania.
- options
- EventSourceOptions
Opcje, takie jak poziom, słowa kluczowe i kod operacji dla zdarzenia.
Wyjątki
Parametr eventName ma wartość null.
Dotyczy
Write<T>(String, EventSourceOptions, Guid, Guid, T)
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
Zapisuje zdarzenie o określonej nazwie, opcjach, powiązanych działaniach i danych zdarzenia.
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)
Parametry typu
- T
Typ definiujący zdarzenie i skojarzone z nim dane. Ten typ musi być typem anonimowym lub oznaczonym atrybutem EventSourceAttribute .
Parametry
- eventName
- String
Nazwa zdarzenia.
- options
- EventSourceOptions
Opcje zdarzenia.
- activityId
- Guid
Identyfikator działania skojarzonego ze zdarzeniem.
- relatedActivityId
- Guid
Identyfikator skojarzonego działania lub Empty jeśli nie ma skojarzonego działania.
- data
- T
Dane zdarzenia. Ten typ musi być typem anonimowym lub oznaczonym atrybutem EventDataAttribute .
- Atrybuty
Uwagi
Jeśli eventName ma nullwartość , nazwa zdarzenia jest automatycznie pochodna z danych zdarzeń typu T (Name) lub określana na podstawie nazwy typu T. Właściwości data wystąpienia publicznego klasy będą zapisywane rekursywnie w celu utworzenia pól zdarzeń.
Dotyczy
Write<T>(String, T)
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
Zapisuje zdarzenie o określonej nazwie i danych.
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)
Parametry typu
- T
Typ definiujący zdarzenie i skojarzone z nim dane. Ten typ musi być typem anonimowym lub oznaczonym atrybutem EventSourceAttribute .
Parametry
- eventName
- String
Nazwa zdarzenia.
- data
- T
Dane zdarzenia. Ten typ musi być typem anonimowym lub oznaczonym atrybutem EventDataAttribute .
- Atrybuty
Uwagi
Jeśli eventName ma nullwartość , nazwa zdarzenia jest automatycznie pochodna z danych zdarzeń typu T (Name) lub określana na podstawie nazwy typu T. Właściwości data wystąpienia publicznego klasy będą zapisywane rekursywnie w celu utworzenia pól zdarzeń.
Dotyczy
Write<T>(String, EventSourceOptions, T)
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
Zapisuje zdarzenie o określonej nazwie, danych zdarzenia i opcjach.
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)
Parametry typu
- T
Typ definiujący zdarzenie i skojarzone z nim dane. Ten typ musi być typem anonimowym lub oznaczonym atrybutem EventSourceAttribute .
Parametry
- eventName
- String
Nazwa zdarzenia.
- options
- EventSourceOptions
Opcje zdarzenia.
- data
- T
Dane zdarzenia. Ten typ musi być typem anonimowym lub oznaczonym atrybutem EventDataAttribute .
- Atrybuty
Uwagi
Jeśli eventName ma nullwartość , nazwa zdarzenia jest automatycznie pochodna z danych zdarzeń typu T (Name) lub określana na podstawie nazwy typu T. Właściwości data wystąpienia publicznego klasy będą zapisywane rekursywnie w celu utworzenia pól zdarzeń.
Dotyczy
Write<T>(String, EventSourceOptions, T)
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
- Źródło:
- TraceLoggingEventSource.cs
Zapisuje zdarzenie o określonej nazwie, opcjach i danych zdarzenia.
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)
Parametry typu
- T
Typ definiujący zdarzenie i skojarzone z nim dane. Ten typ musi być typem anonimowym lub oznaczonym atrybutem EventSourceAttribute .
Parametry
- eventName
- String
Nazwa zdarzenia.
- options
- EventSourceOptions
Opcje zdarzenia.
- data
- T
Dane zdarzenia. Ten typ musi być typem anonimowym lub oznaczonym atrybutem EventDataAttribute .
- Atrybuty
Uwagi
Jeśli eventName ma nullwartość , nazwa zdarzenia jest automatycznie pochodna z danych zdarzeń typu T (Name) lub określana na podstawie nazwy typu T. Właściwości data wystąpienia publicznego klasy będą zapisywane rekursywnie w celu utworzenia pól zdarzeń.