Skip to content

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

NameSummary
.ctorInitializes a new instance of the [SingleAssignmentDisposable](# class.

Properties

NameSummary
IsDisposedGets a value that indicates whether the object is disposed.
DisposableGets or sets the underlying disposable. After disposal, the result of getting this property is undefined.

Methods

NameSummary
DisposeDisposes the underlying disposable.
Inherited members