public static IDisposalContinuation DisposeSafelyWith( this IDisposable disposable, CancellationToken cancellationToken) { var safeDispose = disposable.MakeSafe(); return(DisposeWith(safeDispose, cancellationToken)); }
public static IDisposalContinuation DisposeSafelyOnNext <TEvent>( this IDisposable disposable, IObservable <TEvent> observable) { var safeDispose = disposable.MakeSafe(); return(DisposeOnNext(safeDispose, observable)); }
public static IDisposalContinuation DisposeSafelyAfer( this IDisposable disposable, TimeSpan duration) { var safeDispose = disposable.MakeSafe(); return(DisposeAfer(safeDispose, duration)); }
public static void DisposeSafely( this IDisposable disposable) { disposable.MakeSafe().Dispose(); }