CancellationTokenSource.CancelAfter Method (TimeSpan)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Schedules a Cancel operation on this CancellationTokenSource.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- delay
- Type: System.TimeSpan
The time span to wait before canceling this CancellationTokenSource.
| Exception | Condition |
|---|---|
| ObjectDisposedException | The exception thrown when this CancellationTokenSource has been disposed. |
| ArgumentOutOfRangeException | The exception that is thrown when delay is less than -1 or greater than Int32.MaxValue. |
Show: