ArcGIS Pro 2.8 API Reference Guide
Register Method (AsyncPresentationEvent<TPayload>)

ArcGIS.Core.Events Namespace > AsyncPresentationEvent<TPayload> Class : Register Method
The delegate that gets executed when the event is published.
Set to true to maintain a strong reference
Subscribes a delegate to an event that will be published on the publisher thread. AsyncPresentationEvent<TPayload> will maintain a to the target of the supplied action delegate.
Syntax

Parameters

action
The delegate that gets executed when the event is published.
keepSubscriberAlive
Set to true to maintain a strong reference

Return Value

A SubscriptionToken that uniquely identifies the added subscription.
Exceptions
ExceptionDescription
action
Remarks
The AsyncPresentationEvent collection is thread-safe.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

AsyncPresentationEvent<TPayload> Class
AsyncPresentationEvent<TPayload> Members
System.WeakReference