Share via


EventRegistrationTokenTable<T>.GetOrCreateEventRegistrationTokenTable 方法

定義

傳回指定的事件註冊語彙基元表 (若不是 null);否則傳迴新的事件註冊語彙基元表。

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)

參數

refEventTable
EventRegistrationTokenTable<T>

事件註冊語彙基元資料表,以傳址方式傳遞。

傳回

refEventTable所指定的事件註冊語彙基元表格(如果它不是null); 否則為新的事件註冊語彙基元表格。

備註

GetOrCreateEventRegistrationTokenTable 有數個線程可以建立數據表的案例中,使用 方法初始化事件註冊令牌數據表。 如果同時在多個線程上呼叫這個方法,則會在所有線程上傳回相同的事件註冊令牌數據表。

適用於