Registers a delegate that will be called when this System.Threading.CancellationToken is canceled.
- callback
- The delegate to be executed when the System.Threading.CancellationToken is canceled.
The System.Threading.CancellationTokenRegistration instance that can be used to deregister the callback.
If this token is already in the canceled state, the delegate will be run immediately and synchronously. Any exception the delegate generates will be propagated out of this method call.
The current System.Threading.ExecutionContext, if one exists, will be captured along with the delegate and will be used when executing it.