4#include <system/object.h>
5#include <system/action.h>
7namespace System {
namespace Threading {
9class CancellationTokenSource;
10class CancellationToken;
34 int32_t m_registration = -1;
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Propagates notification that operations should be canceled. This class provides a mechanism for coope...
Definition: cancellation_token.h:43
static CancellationToken get_None()
Returns an empty System::Threading::CancellationToken value.
void ThrowIfCancellationRequested() const
Throws a OperationCanceledException if cancellation has been requested.
bool get_IsCancellationRequested() const
Gets whether cancellation has been requested for this token.
CancellationTokenRegistration Register(const Action<> &callback) const
Registers a callback that will be invoked when cancellation is requested.
bool get_CanBeCanceled() const
Gets whether this token is capable of being in the canceled state.
CancellationToken()
Default constructor.
Represents a registration for a cancellation token callback.
Definition: cancellation_token.h:19
void Dispose()
Disposes the registration and removes the callback from the associated CancellationTokenSource....
A cancellation token source that can be used to trigger cancellation notifications.
Definition: cancellation_token_source.h:17
Subclass of System::SmartPtr which sets itself to weak mode at construction. Please note that this cl...
Definition: weak_ptr.h:18
Definition: db_command.h:9
MulticastDelegate< void(Args...)> Action
Delegate type that references methods that have no return value.
Definition: action.h:40