Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Represents a group of Disposables that are disposed together.
Inheritance Hierarchy
System.Object
System.Reactive.Disposables.CompositeDisposable
Namespace: System.Reactive.Disposables
Assembly: System.Reactive (in System.Reactive.dll)
Syntax
'Declaration
Public NotInheritable Class CompositeDisposable _
Implements ICollection(Of IDisposable), IEnumerable(Of IDisposable), _
IEnumerable, IDisposable
'Usage
Dim instance As CompositeDisposable
public sealed class CompositeDisposable : ICollection<IDisposable>,
IEnumerable<IDisposable>, IEnumerable, IDisposable
public ref class CompositeDisposable sealed : ICollection<IDisposable^>,
IEnumerable<IDisposable^>, IEnumerable, IDisposable
[<SealedAttribute>]
type CompositeDisposable =
class
interface ICollection<IDisposable>
interface IEnumerable<IDisposable>
interface IEnumerable
interface IDisposable
end
public final class CompositeDisposable implements ICollection<IDisposable>, IEnumerable<IDisposable>, IEnumerable, IDisposable
The CompositeDisposable type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() |
CompositeDisposable() | Initializes a new instance of the CompositeDisposable class from a group of disposables. |
![]() |
CompositeDisposable(IEnumerable<IDisposable>) | Initializes a new instance of the CompositeDisposable class from a group of disposables. |
![]() |
CompositeDisposable(IDisposable[]) | Initializes a new instance of the CompositeDisposable class from a group of disposables. |
![]() |
CompositeDisposable(Int32) | Initializes a new instance of the CompositeDisposable class with the specified number of disposables. |
Top
Properties
Name | Description | |
---|---|---|
![]() |
Count | Gets the number of disposables contained in the CompositeDisposable. |
![]() |
IsDisposed | Gets a value that indicates whether the object is disposed. |
![]() |
IsReadOnly | Always returns false. |
Top
Methods
Name | Description | |
---|---|---|
![]() |
Add | Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. |
![]() |
Clear | Removes and disposes all disposables from the GroupDisposable, but does not dispose the CompositeDisposable. |
![]() |
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. |
![]() |
Dispose | Disposes all disposables in the group and removes them from the group. |
![]() |
Equals | (Inherited from Object.) |
![]() |
Finalize | (Inherited from Object.) |
![]() |
GetEnumerator | Returns an enumerator that iterates through the CompositeDisposable. |
![]() |
GetHashCode | (Inherited from Object.) |
![]() |
GetType | (Inherited from Object.) |
![]() |
MemberwiseClone | (Inherited from Object.) |
![]() |
Remove | Removes and disposes the first occurrence of a disposable from the CompositeDisposable. |
![]() |
ToString | (Inherited from Object.) |
Top
Extension Methods
Name | Description | |
---|---|---|
![]() |
AssertEqual<IDisposable>(IEnumerable<IDisposable>) | Overloaded. (Defined by Extensions.) |
![]() |
AssertEqual<IDisposable>(IDisposable[]) | Overloaded. (Defined by Extensions.) |
![]() |
Subscribe<IDisposable>(IObserver<IDisposable>) | Overloaded. Subscribes an observer to an enumerable sequence with the specified source and observer. (Defined by Observable.) |
![]() |
Subscribe<IDisposable>(IObserver<IDisposable>, IScheduler) | Overloaded. Subscribes an observer to an enumerable sequence with the specified source and observer. (Defined by Observable.) |
![]() |
ToObservable<IDisposable>() | Overloaded. Converts an enumerable sequence to an observable sequence with a specified source. (Defined by Observable.) |
![]() |
ToObservable<IDisposable>(IScheduler) | Overloaded. Converts an enumerable sequence to an observable sequence with a specified source and scheduler. (Defined by Observable.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
![]() ![]() |
IEnumerable.GetEnumerator | Returns an enumerator that iterates through the CompositeDisposable. |
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.