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

ReactiveUI.Primitives.Disposables.SingleReplaceableDisposable

A disposable slot whose inner disposable can be replaced, disposing the previous one.
public bool IsDisposed { get; }

Gets a value indicating whether this instance is disposed.

Initializes a new instance of the SingleReplaceableDisposable class.

Initializes a new instance of the SingleReplaceableDisposable class.

Initializes a new instance of the SingleReplaceableDisposable class.

public SingleReplaceableDisposable(IDisposable disposable, Action action)

Initializes a new instance of the SingleReplaceableDisposable class.

public void Create(IDisposable disposable)

Assigns the inner disposable and disposes the value it displaces; once this slot is disposed the incoming value is disposed instead.

public void Dispose()

Disposes the inner value, invokes the constructor-supplied action and blocks further assignments; repeated calls have no further effect.