Bagikan melalui


EventRegistrationTokenTable<T>.GetOrCreateEventRegistrationTokenTable Metode

Definisi

Mengembalikan tabel token pendaftaran peristiwa yang ditentukan, jika tidak ; jika tidak null, mengembalikan tabel token pendaftaran peristiwa baru.

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)

Parameter

refEventTable
EventRegistrationTokenTable<T>

Tabel token pendaftaran peristiwa, diteruskan oleh referensi.

Mengembalikan

Tabel token pendaftaran peristiwa yang ditentukan oleh refEventTable, jika tidak ; jika tidak null, tabel token pendaftaran peristiwa baru.

Keterangan

GetOrCreateEventRegistrationTokenTable Gunakan metode untuk menginisialisasi tabel token pendaftaran peristiwa dalam skenario di mana salah satu dari beberapa utas dapat membuat tabel. Jika metode ini dipanggil pada beberapa utas pada saat yang sama, tabel token pendaftaran peristiwa yang sama dikembalikan pada semua utas.

Berlaku untuk