CancellationDisposable Class
Represents an IDisposable that can be checked for cancellation status.
Inheritance Hierarchy
System.Object
System.Reactive.Disposables.CancellationDisposable
Namespace: System.Reactive.Disposables
Assembly: System.Reactive (in System.Reactive.dll)
Syntax
'Declaration
Public NotInheritable Class CancellationDisposable _
Implements IDisposable
'Usage
Dim instance As CancellationDisposable
public sealed class CancellationDisposable : IDisposable
public ref class CancellationDisposable sealed : IDisposable
[<SealedAttribute>]
type CancellationDisposable =
class
interface IDisposable
end
public final class CancellationDisposable implements IDisposable
The CancellationDisposable type exposes the following members.
Constructors
Name | Description | |
---|---|---|
CancellationDisposable() | Initializes a new instance of the CancellationDisposable class that uses a new CancellationTokenSource. | |
CancellationDisposable(CancellationTokenSource) | Initializes a new instance of the CancellationDisposable class that uses an existing CancellationTokenSource. |
Top
Properties
Name | Description | |
---|---|---|
IsDisposed | Gets a value that indicates whether the object is disposed. | |
Token | Gets the CancellationToken used by this CancellationDisposable. |
Top
Methods
Name | Description | |
---|---|---|
Dispose | Cancels the CancellationTokenSource. | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
ToString | (Inherited from Object.) |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.