NanoByte.Common
2.6.1
|
Signals to CancellationTokens that they should be canceled. More...
Public Member Functions | |
void | Cancel () |
Notifies all listening CancellationTokens that operations should be canceled. More... | |
override string | ToString () |
void | Dispose () |
![]() | |
override? object | InitializeLifetimeService () |
Properties | |
CancellationToken | Token [get] |
Gets a CancellationToken associated with this CancellationTokenSource. More... | |
bool | IsCancellationRequested [get] |
Indicates whether Cancel has been called. More... | |
WaitHandle | WaitHandle [get] |
Gets a wait handle that is signaled when see cref="Cancel"/> has been called. More... | |
Events | |
Action? | CancellationRequested |
Raised the first time Cancel is called. Subsequent calls will not raise this event again. More... | |
Signals to CancellationTokens that they should be canceled.
Unlike the built-in CancellationToken type of .NET the NanoByte.Common variant supports remoting.
|
inline |
Notifies all listening CancellationTokens that operations should be canceled.
|
get |
Indicates whether Cancel has been called.
|
get |
Gets a CancellationToken associated with this CancellationTokenSource.
|
getpackage |
Gets a wait handle that is signaled when see cref="Cancel"/> has been called.
Action? NanoByte.Common.Tasks.CancellationTokenSource.CancellationRequested |
Raised the first time Cancel is called. Subsequent calls will not raise this event again.
The event is raised from a background thread. Wrap via synchronization context to update UI elements. Handling this blocks the task, therefore observers should handle the event quickly.