<PackageReference Include="System.Reactive" Version="6.0.0" />

ScheduledDisposable

Represents a disposable resource whose disposal invocation will be scheduled on the specified IScheduler.
public IDisposable Disposable { get; }

Gets the underlying disposable. After disposal, the result is undefined.

public bool IsDisposed { get; }

Gets a value that indicates whether the object is disposed.

public IScheduler Scheduler { get; }

Gets the scheduler where the disposable resource will be disposed on.

public ScheduledDisposable(IScheduler scheduler, IDisposable disposable)

Initializes a new instance of the ScheduledDisposable class that uses an IScheduler on which to dispose the disposable.

public void Dispose()

Disposes the wrapped disposable on the provided scheduler.