Skip to content

CancellationDisposable(CancellationTokenSource) constructor

Defined in

Type: CancellationDisposable Namespace: System.Reactive.Disposables Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public CancellationDisposable(CancellationTokenSource cts)
  • 2. public CancellationDisposable()

1. Overload

public CancellationDisposable(CancellationTokenSource cts)

Summary: Initializes a new instance of the CancellationDisposable class that uses an existing CancellationTokenSource.

Parameters

NameTypeDescription
ctsCancellationTokenSourceCancellationTokenSource used for cancellation.

Exceptions

TypeCondition
System.ArgumentNullExceptioncts is null.

2. Overload

public CancellationDisposable()

Summary: Initializes a new instance of the CancellationDisposable class that uses a new CancellationTokenSource.