DisposableExtensions.DisposeWith(T, CompositeDisposable) method¶
Defined in
Type: DisposableExtensions
Namespace: System.Reactive.Disposables.Fluent
Assembly: System.Reactive.dll
Applies to
netstandard2.0
public static T DisposeWith<T>(this T item, CompositeDisposable compositeDisposable) where T : IDisposable
Summary: Ensures the provided disposable is disposed with the specified CompositeDisposable.
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. |
Returns: T --
The disposable.