Skip to content

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, IEnumerable, IEnumerable, ICancelable, IDisposable

Constructors

NameSummary
.ctorInitializes a new instance of the [CompositeDisposable](# class with no disposables contained by it initially.

Properties

NameSummary
CountGets the number of disposables contained in the [CompositeDisposable](#
IsReadOnlyAlways returns false.
IsDisposedGets a value that indicates whether the object is disposed.

Methods

NameSummary
AddAdds a disposable to the [CompositeDisposable](# or disposes the disposable if the...
RemoveRemoves and disposes the first occurrence of a disposable from the [CompositeDisposable](#
DisposeDisposes all disposables in the group and removes them from the group.
ClearRemoves and disposes all disposables from the [CompositeDisposable](# but does not dispose the...
ContainsDetermines whether the [CompositeDisposable](# contains a specific disposable.
CopyToCopies the disposables contained in the [CompositeDisposable](# to an array, starting at a particular array index.
GetEnumeratorReturns an enumerator that iterates through the [CompositeDisposable](#
Inherited members