IExceptionDetector.IsCancellation(Exception, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns whether the provided exception represents a cancellation event for the current provider.
public bool IsCancellation(Exception exception, System.Threading.CancellationToken cancellationToken = default);
abstract member IsCancellation : Exception * System.Threading.CancellationToken -> bool
Public Function IsCancellation (exception As Exception, Optional cancellationToken As CancellationToken = Nothing) As Boolean
Parameters
- exception
- Exception
The exception to be checked for cancellation.
- cancellationToken
- CancellationToken
If exception is insufficient for identifying a cancellation, this is the cancellation token passed to the
asynchronous operation; it can be checked instead as a fallback mechanism.