token property

Gets the CancellationToken with which this registration is associated.

Implementation

CancellationToken get token => _node is CallbackNode
    ? CancellationToken.fromSource(_node?.registrations.source)
    : CancellationToken();