ArcGIS Pro 2.7 API Reference Guide
Register Method (CompositePresentationEvent<TPayload>)

ArcGIS.Core.Events Namespace > CompositePresentationEvent<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 ThreadOption.PublisherThread. CompositePresentationEvent<TPayload> will maintain a to the target of the supplied action delegate.
Syntax
Protected Friend Function Register( _
   ByVal action As Action(Of TPayload), _
   Optional ByVal keepSubscriberAlive As Boolean _
) As SubscriptionToken

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.
Remarks
The CompositePresentationEvent collection is thread-safe.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

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