Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EventRegistrationTokenTable<T> Class

.NET Framework 4.5

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

System.Object
  System.Runtime.InteropServices.WindowsRuntime.EventRegistrationTokenTable<T>

Namespace:  System.Runtime.InteropServices.WindowsRuntime
Assembly:  mscorlib (in mscorlib.dll)

public sealed class EventRegistrationTokenTable<T>
where T : class

Type Parameters

T

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

The EventRegistrationTokenTable<T> type exposes the following members.

  NameDescription
Public methodSupported in .NET for Windows Store appsEventRegistrationTokenTable<T>Initializes a new instance of the EventRegistrationTokenTable<T> class.
Top

  NameDescription
Public propertySupported in .NET for Windows Store appsInvocationListGets 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.
Top

  NameDescription
Public methodSupported in .NET for Windows Store appsAddEventHandlerAdds 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.
Public methodSupported in .NET for Windows Store appsEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodSupported in .NET for Windows Store appsGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodStatic memberSupported in .NET for Windows Store appsGetOrCreateEventRegistrationTokenTableReturns the specified event registration token table, if it is not null; otherwise, returns a new event registration token table.
Public methodSupported in .NET for Windows Store appsGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSupported in .NET for Windows Store appsRemoveEventHandler(T)Removes the specified event handler delegate from the table and the invocation list.
Public methodSupported in .NET for Windows Store appsRemoveEventHandler(EventRegistrationToken)Removes the event handler that is associated with the specified token from the table and the invocation list.
Public methodSupported in .NET for Windows Store appsToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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.

.NET Framework

Supported in: 4.5

.NET for Windows Store apps

Supported in: Windows 8

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft