CompositeDisposable class¶
Defined in
Namespace: System.Reactive.Disposables
Assembly: System.Reactive.dll
Full name: System.Reactive.Disposables.CompositeDisposable
Modifiers: public sealed
Summary¶
Represents a group of disposable resources that are disposed together.
Applies to
netstandard2.0
Class hierarchy
classDiagram
class CompositeDisposable
class ICollection~IDisposable~ {
<>
}
ICollection~IDisposable~ <|.. CompositeDisposable
class IEnumerable~IDisposable~ {
<>
}
IEnumerable~IDisposable~ <|.. CompositeDisposable
class IEnumerable {
<>
}
IEnumerable <|.. CompositeDisposable
class ICancelable {
<>
}
ICancelable <|.. CompositeDisposable
class IDisposable {
<>
}
IDisposable <|.. CompositeDisposable
Implements: ICollection
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [CompositeDisposable](# class with no disposables contained by it initially. |
Properties¶
| Name | Summary |
|---|---|
| Count | Gets the number of disposables contained in the [CompositeDisposable](# |
| IsReadOnly | Always returns false. |
| IsDisposed | Gets a value that indicates whether the object is disposed. |
Methods¶
| Name | Summary |
|---|---|
| Add | Adds a disposable to the [CompositeDisposable](# or disposes the disposable if the... |
| Remove | Removes and disposes the first occurrence of a disposable from the [CompositeDisposable](# |
| Dispose | Disposes all disposables in the group and removes them from the group. |
| Clear | Removes and disposes all disposables from the [CompositeDisposable](# but does not dispose the... |
| Contains | Determines whether the [CompositeDisposable](# contains a specific disposable. |
| CopyTo | Copies the disposables contained in the [CompositeDisposable](# to an array, starting at a particular array index. |
| GetEnumerator | Returns an enumerator that iterates through the [CompositeDisposable](# |