<PackageReference Include="ReactiveUI.Disposables" Version="8.4.0" />

ReactiveUI.Primitives.Disposables.MultipleDisposable

A group of disposables that are disposed together.
public int Count { get; }

Gets the number of held disposables, or zero after disposal.

public bool IsDisposed { get; }

Gets a value indicating whether the object is disposed.

public bool IsReadOnly { get; }

Gets a value indicating whether the collection is read-only, which is always false.

Initializes a new instance of the MultipleDisposable class.

Initializes a new instance of the MultipleDisposable class.

Initializes a new instance of the MultipleDisposable class.

public MultipleDisposable(IDisposable[] disposables)

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

public static IDisposable Create(IDisposable[] disposables)

Creates a new group of disposable resources that are disposed together.

public void Add(IDisposable item)

Adds a disposable to the group, or disposes it immediately when the group is disposed.

public void Clear()

Removes and disposes every disposable currently held without disposing the group itself.

public bool Contains(IDisposable item)

Determines whether the group currently holds the supplied disposable.

public void CopyTo(IDisposable[] array, int arrayIndex)

Copies the disposables currently held into array starting at arrayIndex.

public void Dispose()

Disposes every held disposable and marks the group disposed; repeated calls have no further effect.

Returns an enumerator over a snapshot of the disposables currently held.

public bool Remove(IDisposable item)

Removes and disposes the requested disposable from the group.