CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
System::Threading::CancellationTokenRegistration Class Reference

Represents a registration for a cancellation token callback. More...

#include <cancellation_token.h>

Public Member Functions

void Dispose ()
 Disposes the registration and removes the callback from the associated CancellationTokenSource. After calling this method, the registered callback will no longer be invoked when the associated CancellationTokenSource is canceled. More...
 

Detailed Description

Represents a registration for a cancellation token callback.

This class allows for the deregistration of a callback from a cancellation token. When disposed, it removes the callback from the associated CancellationTokenSource.

Note
This class should not be created directly - it is returned by CancellationToken registration methods.

Member Function Documentation

◆ Dispose()

void System::Threading::CancellationTokenRegistration::Dispose ( )

Disposes the registration and removes the callback from the associated CancellationTokenSource. After calling this method, the registered callback will no longer be invoked when the associated CancellationTokenSource is canceled.

Note
It is safe to call this method multiple times - subsequent calls will have no effect.