Closed Claye-L closed 5 years ago
Hi,
first of all, thank for reporting.
The AddTo-Method is from ReactiveProperty (a alternative to ReactiveUI). It's an example of what I call a tracking method. Since this concept is already build-in the extension (from the bug in #34), all I need Is the signature and full qualified namespace of the method DisposeWith
. Looks like you provided this with your last link.
System.Reactive.Disposables.DisposableMixins.DisposeWith<T>(this T item, CompositeDisposable compositeDisposable)
Since ReactiveUI is a open source library, I'm going to add this to the default configuration. You can see the current default configuration here
Currently the configuration is build-in an not adjustable. Its planed to make it configurable within Visual Studio in future.
Will be part of release 2.0.0
Prerequisites
Description
I use ReactiveUI, which uses an extension method
DisposeWith()
that is just a wrapper for CompositeDisposable.Add(). Calling this method does not diable the warning on the disposable object.I have seen #34 and #49 that already reference this problem, however i can not find the AddTo extension method that you refer to in #34 (
Reactive.Bindings.Extensions.IDisposableExtensions.AddTo(this T disposable, ICollection container) where T : Disposable
), as that method seems to not be present in the Reactive source code.Source Code
This feature would make this extension a great tool when working with reactiveui or reactive extensions in general as this kind of work generates a lot of disposable objects.
Suggested solution
Add tracking for reactiveui's DisposeWith() extension method, which acts as a replacement for the AddTo() extension method.