Windows Dev Center

EventRegistrationToken structure

Represents a reference to a delegate that receives change notifications.

.NET:  When programming with .NET, this type is hidden. Advanced-scenario developers should use System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken.

Syntax


var eventRegistrationToken = {
    value : /* Your value */
}

Members

The EventRegistrationToken structure has these fields.

FieldData typeDescription
Value | value

Number [JavaScript] | int64 [C++]

The reference to the delegate.

 

Remarks

When programming with .NET, this type is hidden and developers that need an event registration token for advanced event scenarios should use the System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken type. For most app code, you won't need EventRegistrationToken (or event registration tokens) at all, because the add/remove syntax for C# and Visual Basic languages enables the compiler to generate the registration tokens from a simpler syntax.

In the event subscription model, a delegate registers to receive change notifications from a specified object such as a collection. The EventRegistrationToken is used to remove the delegate as a subscriber of change notifications when notifications are no longer needed.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.FoundationContract, introduced version 1.0

Namespace

Windows.Foundation
Windows::Foundation [C++]

Metadata

Windows.Foundation.FoundationContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Foundation
Windows::Foundation [C++]

Metadata

Windows.winmd

Attributes

[Version(0x06020000)]

See also

System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken
Events (C++/CX)
Delegates (C++/CX)

 

 

Show:
© 2015 Microsoft