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

ReactiveUI.Primitives.Disposables.DisposableSet

A group of disposables that are disposed together, embedded as a mutable field by the type that owns them.
public int Count { get; }

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

public bool IsDisposed { get; }

Gets a value indicating whether the set is disposed.

public DisposableSet(IDisposable first, IDisposable second)

Initializes a new instance of the DisposableSet struct holding two disposables.

public DisposableSet(IDisposable first, IDisposable second, IDisposable third)

Initializes a new instance of the DisposableSet struct holding three disposables.

public DisposableSet(IDisposable[] disposables)

Initializes a new instance of the DisposableSet struct from a group of disposables, skipping null entries.

public static bool op_Equality(DisposableSet left, DisposableSet right)

public static bool op_Inequality(DisposableSet left, DisposableSet right)

public void Add(IDisposable item)

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

public void Clear()

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

public bool Contains(IDisposable item)

Determines whether the set 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 set disposed; repeated calls have no further effect.

public bool Equals(DisposableSet other)

public bool Remove(IDisposable item)

Removes and disposes the requested disposable.

Captures the disposables currently held into a list under the gate.