Export (0) Print
Expand All

CompositeDisposable Class

Represents a group of Disposables that are disposed together.

System.Object
  System.Reactive.Disposables.CompositeDisposable

Namespace:  System.Reactive.Disposables
Assembly:  System.Reactive (in System.Reactive.dll)

public sealed class CompositeDisposable : ICollection<IDisposable>, 
	IEnumerable<IDisposable>, IEnumerable, IDisposable

The CompositeDisposable type exposes the following members.

  NameDescription
Public methodCompositeDisposable()Initializes a new instance of the CompositeDisposable class from a group of disposables.
Public methodCompositeDisposable(IEnumerable<IDisposable>)Initializes a new instance of the CompositeDisposable class from a group of disposables.
Public methodCompositeDisposable(IDisposable[])Initializes a new instance of the CompositeDisposable class from a group of disposables.
Public methodCompositeDisposable(Int32)Initializes a new instance of the CompositeDisposable class with the specified number of disposables.
Top

  NameDescription
Public propertyCountGets the number of disposables contained in the CompositeDisposable.
Public propertyIsDisposedGets a value that indicates whether the object is disposed.
Public propertyIsReadOnlyAlways returns false.
Top

  NameDescription
Public methodAddAdds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed.
Public methodClearRemoves and disposes all disposables from the GroupDisposable, but does not dispose the CompositeDisposable.
Public methodContainsDetermines whether the CompositeDisposable contains a specific disposable.
Public methodCopyToCopies the disposables contained in the CompositeDisposable to an array, starting at a particular array index.
Public methodDisposeDisposes all disposables in the group and removes them from the group.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetEnumeratorReturns an enumerator that iterates through the CompositeDisposable.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodRemoveRemoves and disposes the first occurrence of a disposable from the CompositeDisposable.
Public methodToString (Inherited from Object.)
Top

  NameDescription
Public Extension MethodAssertEqual<IDisposable>(IEnumerable<IDisposable>)Overloaded. (Defined by Extensions.)
Public Extension MethodAssertEqual<IDisposable>(IDisposable[])Overloaded. (Defined by Extensions.)
Public Extension MethodSubscribe<IDisposable>(IObserver<IDisposable>)Overloaded. Subscribes an observer to an enumerable sequence with the specified source and observer. (Defined by Observable.)
Public Extension MethodSubscribe<IDisposable>(IObserver<IDisposable>, IScheduler)Overloaded. Subscribes an observer to an enumerable sequence with the specified source and observer. (Defined by Observable.)
Public Extension MethodToObservable<IDisposable>()Overloaded. Converts an enumerable sequence to an observable sequence with a specified source. (Defined by Observable.)
Public Extension MethodToObservable<IDisposable>(IScheduler)Overloaded. Converts an enumerable sequence to an observable sequence with a specified source and scheduler. (Defined by Observable.)
Top

  NameDescription
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorReturns an enumerator that iterates through the CompositeDisposable.
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft