EventRegistrationTokenTable<T> EventRegistrationTokenTable<T> EventRegistrationTokenTable<T> EventRegistrationTokenTable<T> Class


Stores mappings between delegates and event tokens, to support the implementation of a Windows Runtime event in managed code.

generic <typename T>
 where T : classpublic ref class EventRegistrationTokenTable sealed
public sealed class EventRegistrationTokenTable<T> where T : class
type EventRegistrationTokenTable<'T (requires 'T : null)> = class
Public NotInheritable Class EventRegistrationTokenTable(Of T)

Type Parameters


The type of the event handler delegate for a particular event.



Use this type when you need to manage the addition and removal of events manually.

An instance of this table stores the delegates that represent the event handlers that have been added to an event. To raise the event, invoke the delegate that is returned by the InvocationList property, if it is not null. An instance of this table is required for each event.


EventRegistrationTokenTable<T>() EventRegistrationTokenTable<T>() EventRegistrationTokenTable<T>() EventRegistrationTokenTable<T>()

Initializes a new instance of the EventRegistrationTokenTable<T> class.


InvocationList InvocationList InvocationList InvocationList

Gets or sets a delegate of type T whose invocation list includes all the event handler delegates that have been added, and that have not yet been removed. Invoking this delegate invokes all the event handlers.


AddEventHandler(T) AddEventHandler(T) AddEventHandler(T) AddEventHandler(T)

Adds the specified event handler to the table and to the invocation list, and returns a token that can be used to remove the event handler.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetOrCreateEventRegistrationTokenTable(EventRegistrationTokenTable<T>) GetOrCreateEventRegistrationTokenTable(EventRegistrationTokenTable<T>) GetOrCreateEventRegistrationTokenTable(EventRegistrationTokenTable<T>) GetOrCreateEventRegistrationTokenTable(EventRegistrationTokenTable<T>)

Returns the specified event registration token table, if it is not null; otherwise, returns a new event registration token table.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RemoveEventHandler(EventRegistrationToken) RemoveEventHandler(EventRegistrationToken) RemoveEventHandler(EventRegistrationToken) RemoveEventHandler(EventRegistrationToken)

Removes the event handler that is associated with the specified token from the table and the invocation list.

RemoveEventHandler(T) RemoveEventHandler(T) RemoveEventHandler(T) RemoveEventHandler(T)

Removes the specified event handler delegate from the table and the invocation list.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to