public static SubscriptionToken Subscribe( Func<CancelEventArgs,Task> action, bool keepSubscriberAlive )
Public Shared Function Subscribe( _ ByVal action As Func(Of CancelEventArgs,Task), _ Optional ByVal keepSubscriberAlive As Boolean _ ) As SubscriptionToken
Parameters
- action
- The method to call.
- keepSubscriberAlive
- Subscribe with a strong reference. Default is false (weak reference).
Return Value
A SubscriptionToken that can be used to unsubscribe with.