CancellationDisposable Constructor (CancellationTokenSource)
Initializes a new instance of the CancellationDisposable class that uses an existing CancellationTokenSource.
Namespace: System.Reactive.Disposables
Assembly: System.Reactive (in System.Reactive.dll)
Syntax
'Declaration
Public Sub New ( _
cts As CancellationTokenSource _
)
'Usage
Dim cts As CancellationTokenSource
Dim instance As New CancellationDisposable(cts)
public CancellationDisposable(
CancellationTokenSource cts
)
public:
CancellationDisposable(
CancellationTokenSource^ cts
)
new :
cts:CancellationTokenSource -> CancellationDisposable
public function CancellationDisposable(
cts : CancellationTokenSource
)
Parameters
- cts
Type: System.Threading.CancellationTokenSource
The CancellationTokenSource used for cancellation.