Compositedisposable

CompositeDisposable Constructor

Initializes a new instance of the CompositeDisposable class from a group of disposables.

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

Syntax

'Declaration
Public Sub New
'Usage

Dim instance As New CompositeDisposable()
public CompositeDisposable()
public:
CompositeDisposable()
new : unit -> CompositeDisposable
public function CompositeDisposable()

See Also

Reference

CompositeDisposable Class

CompositeDisposable Overload

System.Reactive.Disposables Namespace

CompositeDisposable Constructor (IEnumerable<IDisposable>)

Initializes a new instance of the CompositeDisposable class from a group of disposables.

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

Syntax

'Declaration
Public Sub New ( _
    disposables As IEnumerable(Of IDisposable) _
)
'Usage
Dim disposables As IEnumerable(Of IDisposable)

Dim instance As New CompositeDisposable(disposables)
public CompositeDisposable(
    IEnumerable<IDisposable> disposables
)
public:
CompositeDisposable(
    IEnumerable<IDisposable^>^ disposables
)
new : 
        disposables:IEnumerable<IDisposable> -> CompositeDisposable
public function CompositeDisposable(
    disposables : IEnumerable<IDisposable>
)

Parameters

See Also

Reference

CompositeDisposable Class

CompositeDisposable Overload

System.Reactive.Disposables Namespace

CompositeDisposable Methods

Include Protected Members
Include Inherited Members

The CompositeDisposable type exposes the following members.

Methods

NameDescriptionPublic 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

Extension Methods

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

Explicit Interface Implementations

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

See Also

Reference

CompositeDisposable Class

System.Reactive.Disposables Namespace

CompositeDisposable Constructor (Int32)

Initializes a new instance of the CompositeDisposable class with the specified number of disposables.

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

Syntax

'Declaration
Public Sub New ( _
    capacity As Integer _
)
'Usage
Dim capacity As Integer

Dim instance As New CompositeDisposable(capacity)
public CompositeDisposable(
    int capacity
)
public:
CompositeDisposable(
    int capacity
)
new : 
        capacity:int -> CompositeDisposable
public function CompositeDisposable(
    capacity : int
)

Parameters

  • capacity
    Type: System.Int32
    The number of disposables that the new CompositeDisposable can initially store.

See Also

Reference

CompositeDisposable Class

CompositeDisposable Overload

System.Reactive.Disposables Namespace

CompositeDisposable Constructor (array<IDisposable[])

Initializes a new instance of the CompositeDisposable class from a group of disposables.

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

Syntax

'Declaration
Public Sub New ( _
    ParamArray disposables As IDisposable() _
)
'Usage
Dim disposables As IDisposable()

Dim instance As New CompositeDisposable(disposables)
public CompositeDisposable(
    params IDisposable[] disposables
)
public:
CompositeDisposable(
    ... array<IDisposable^>^ disposables
)
new : 
        disposables:IDisposable[] -> CompositeDisposable
public function CompositeDisposable(
    ... disposables : IDisposable[]
)

Parameters

  • disposables
    Type: array<System.IDisposable[]
    The disposables that will be disposed together.

See Also

Reference

CompositeDisposable Class

CompositeDisposable Overload

System.Reactive.Disposables Namespace

CompositeDisposable Properties

Include Protected Members
Include Inherited Members

The CompositeDisposable type exposes the following members.

Properties

NameDescriptionPublic 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

See Also

Reference

CompositeDisposable Class

System.Reactive.Disposables Namespace

CompositeDisposable Class

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

NameDescriptionPublic methodCompositeDisposable()Initializes a new instance of the CompositeDisposable class from a group of disposables.Public methodCompositeDisposable(IEnumerable)Initializes a new instance of the CompositeDisposable class from a group of disposables.Public methodCompositeDisposable(array<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

Properties

NameDescriptionPublic 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

Methods

NameDescriptionPublic 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

Extension Methods

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

Explicit Interface Implementations

NameDescriptionExplicit interface implemetationPrivate methodIEnumerable.GetEnumeratorReturns 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.

See Also

Reference

System.Reactive.Disposables Namespace

CompositeDisposable Constructor

Include Protected Members
Include Inherited Members

Initializes a new instance of the CompositeDisposable class.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

NameDescriptionPublic methodCompositeDisposable()Initializes a new instance of the CompositeDisposable class from a group of disposables.Public methodCompositeDisposable(IEnumerable)Initializes a new instance of the CompositeDisposable class from a group of disposables.Public methodCompositeDisposable(array<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

See Also

Reference

CompositeDisposable Class

System.Reactive.Disposables Namespace