Skip to content

Commit d24e69f

Browse files
committed
Fix: Dispose RxCommand having exceptions
1 parent 80e4561 commit d24e69f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ReactiveUI/ReactiveCommand/ReactiveCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,10 @@ public class ReactiveCommand<TParam, TResult> : ReactiveCommandBase<TParam, TRes
628628
{
629629
private readonly IObservable<bool> _canExecute;
630630
private readonly IDisposable _canExecuteSubscription;
631+
[SuppressMessage("Design", "CA2213: Dispose member", Justification = "Internal use only")]
631632
private readonly ScheduledSubject<Exception> _exceptions;
632633
private readonly Func<TParam, IObservable<TResult>> _execute;
634+
[SuppressMessage("Design", "CA2213: Dispose member", Justification = "Internal use only")]
633635
private readonly Subject<ExecutionInfo> _executionInfo;
634636
private readonly IObservable<bool> _isExecuting;
635637
private readonly IScheduler _outputScheduler;
@@ -779,8 +781,6 @@ protected override void Dispose(bool disposing)
779781
return;
780782
}
781783

782-
_executionInfo.Dispose();
783-
_exceptions.Dispose();
784784
_canExecuteSubscription.Dispose();
785785
}
786786

0 commit comments

Comments
 (0)