ThrowIfCancellationRequested()
CancellationToken::ThrowIfCancellationRequested() const method
Throws a OperationCanceledException if cancellation has been requested.
void System::Threading::CancellationToken::ThrowIfCancellationRequested() const
Exceptions
| Exception | Description |
|---|---|
| OperationCanceledException | if get_IsCancellationRequested is true. |
Remarks
This method provides a convenient way to check for cancellation at specific points in your code where it’s safe to throw an exception.
See Also
- Class CancellationToken
- Namespace System::Threading
- Library Aspose.Slides