The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

DisposableMixins.

DisposeWith<T>(T, CompositeDisposable) Method

Summary

Ensures the provided disposable is disposed with the specified CompositeDisposable.
Namespace
System.Reactive.Disposables
Containing Type
DisposableMixins

Syntax

public static T DisposeWith<T>(this T item, CompositeDisposable compositeDisposable) 
    where T : IDisposable

Type Parameters

Name Description
T The type of the disposable.

Parameters

Name Type Description
item T The disposable we are going to want to be disposed by the CompositeDisposable.
compositeDisposable CompositeDisposable The CompositeDisposable to which item will be added.

Return Value

Type Description
T The disposable.