SingleAssignmentDisposable class¶
Defined in
Namespace: System.Reactive.Disposables
Assembly: System.Reactive.dll
Full name: System.Reactive.Disposables.SingleAssignmentDisposable
Modifiers: public sealed
Summary¶
Represents a disposable resource which only allows a single assignment of its underlying disposable resource. If an underlying disposable resource has already been set, future attempts to set the underlying disposable resource will throw an InvalidOperationException.
Applies to
netstandard2.0
Class hierarchy
classDiagram
class SingleAssignmentDisposable
class ICancelable {
<>
}
ICancelable <|.. SingleAssignmentDisposable
class IDisposable {
<>
}
IDisposable <|.. SingleAssignmentDisposable
Implements: ICancelable, IDisposable
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [SingleAssignmentDisposable](# class. |
Properties¶
| Name | Summary |
|---|---|
| IsDisposed | Gets a value that indicates whether the object is disposed. |
| Disposable | Gets or sets the underlying disposable. After disposal, the result of getting this property is undefined. |
Methods¶
| Name | Summary |
|---|---|
| Dispose | Disposes the underlying disposable. |