I have a viewmodel where I'm trying to use WhenActivated to dispose:
this.WhenActivated(disposables =>
{
this.WhenAnyValue(x => x.Selected)
.WhereNotNull()
.ObserveOn(RxApp.MainThreadScheduler)
.Do(x => _logger.LogInformation($"selected {x?.Name}"))
.Subscribe(x => process(x))
.DisposeWith(disposables);
});
And I get the error:
MyViewModel.cs(59, 22): [CS0121] The call is ambiguous between the following methods or properties: 'System.Reactive.Disposables.DisposableMixins.DisposeWith(T, System.Reactive.Disposables.CompositeDisposable)' and 'Avalonia.Controls.Mixins.DisposableMixin.DisposeWith(T, System.Reactive.Disposables.CompositeDisposable)'
usingdirective for eitherSystem.Reactive.DisposablesorAvalonia.Controls.Mixins? (If only one of those namespaces is imported, the call won't be ambiguous.)