private void DecrementExecutions() { // Raise the IsExecutingChanged only when the counter is at 0. if (Interlocked.Decrement(ref _executions) == 0) { IsExecutingChanged?.Invoke(this, EventArgs.Empty); RaisePropertyChanged(nameof(IsExecuting)); } }
private void RaiseIsExecutingChanged() { IsExecutingChanged?.Invoke(this, EventArgs.Empty); }