EventRegistrationTokenTable<T>.GetOrCreateEventRegistrationTokenTable 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
若未 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 方法初始化事件註冊令牌表。 若此方法同時在多個執行緒中呼叫,所有執行緒都會回傳相同的事件註冊令牌表。