Język

EventRegistrationTokenTable<T>.GetOrCreateEventRegistrationTokenTable Metoda

Definicja

Zwraca określoną tabelę tokenu rejestracji zdarzeń, jeśli nie nulljest ; w przeciwnym razie zwraca nową tabelę tokenu rejestracji zdarzeń.

public:
 static System::Runtime::InteropServices::WindowsRuntime::EventRegistrationTokenTable<T> ^ GetOrCreateEventRegistrationTokenTable(System::Runtime::InteropServices::WindowsRuntime::EventRegistrationTokenTable<T> ^ % refEventTable);
public static System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable<T> GetOrCreateEventRegistrationTokenTable(ref System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable<T> refEventTable);
public static System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable<T> GetOrCreateEventRegistrationTokenTable(ref System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable<T>? refEventTable);
static member GetOrCreateEventRegistrationTokenTable : EventRegistrationTokenTable -> System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable<'T (requires 'T : null)>
Public Shared Function GetOrCreateEventRegistrationTokenTable (ByRef refEventTable As EventRegistrationTokenTable(Of T)) As EventRegistrationTokenTable(Of T)

Parametry

refEventTable
EventRegistrationTokenTable<T>

Tabela tokenu rejestracji zdarzeń przekazana przez odwołanie.

Zwraca

Tabela tokenów rejestracji zdarzeń określona przez refEventTableparametr , jeśli nie nulljest ; w przeciwnym razie nowa tabela tokenu rejestracji zdarzeń.

Uwagi

GetOrCreateEventRegistrationTokenTable Użyj metody , aby zainicjować tabelę tokenów rejestracji zdarzeń w scenariuszach, w których dowolna z kilku wątków może utworzyć tabelę. Jeśli ta metoda jest wywoływana w wielu wątkach jednocześnie, ta sama tabela tokenu rejestracji zdarzeń jest zwracana we wszystkich wątkach.

Dotyczy