Change edit property declaration to use expression body for lambda expressions
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
@@ -197,9 +197,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
.ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(enabled => FeeControlOpacity = enabled ? 1 : 0.5); // Give the control the disabled feeling. Real Disable it not a solution as we have to detect if the slider is moved.
-#pragma warning disable IDE0053 // Use expression body for lambda expressions
- MaxCommand = ReactiveCommand.Create(() => { IsMax = !IsMax; }, outputScheduler: RxApp.MainThreadScheduler);
-#pragma warning restore IDE0053 // Use expression body for lambda expressions
+ MaxCommand = ReactiveCommand.Create(() => IsMax = !IsMax, outputScheduler: RxApp.MainThreadScheduler);
this.WhenAnyValue(x => x.IsMax)
.ObserveOn(RxApp.MainThreadScheduler)
@@ -435,9 +433,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
SetFeesAndTexts();
});
-#pragma warning disable IDE0053 // Use expression body for lambda expressions
- FeeSliderClickedCommand = ReactiveCommand.Create((PointerPressedEventArgs mouse) => { IsSliderFeeUsed = true; });
-#pragma warning restore IDE0053 // Use expression body for lambda expressions
+ FeeSliderClickedCommand = ReactiveCommand.Create((PointerPressedEventArgs mouse) => IsSliderFeeUsed = true);
HighLightFeeSliderCommand = ReactiveCommand.Create((bool entered) =>
{
@@ -905,7 +901,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public ReactiveCommand<Unit, Unit> BuildTransactionCommand { get; }
- public ReactiveCommand<Unit, Unit> MaxCommand { get; }
+ public ReactiveCommand<Unit, bool> MaxCommand { get; }
public ReactiveCommand<Unit, Unit> FeeRateCommand { get; }
@@ -913,7 +909,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
public ReactiveCommand<KeyEventArgs, Unit> UserFeeTextKeyUpCommand { get; }
- public ReactiveCommand<PointerPressedEventArgs, Unit> FeeSliderClickedCommand { get; }
+ public ReactiveCommand<PointerPressedEventArgs, bool> FeeSliderClickedCommand { get; }
public ReactiveCommand<bool, Unit> HighLightFeeSliderCommand { get; }

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletAdvancedViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletAdvancedViewModel.cs
@@ -13,7 +13,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private bool _isExpanded;
- public ReactiveCommand<Unit, Unit> ExpandItCommand { get; }
+ public ReactiveCommand<Unit, bool> ExpandItCommand { get; }
public bool IsExpanded
{
@@ -25,9 +25,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
{
Items = new ObservableCollection<WalletActionViewModel>();
-#pragma warning disable IDE0053 // Use expression body for lambda expressions
- ExpandItCommand = ReactiveCommand.Create(() => { IsExpanded = !IsExpanded; });
-#pragma warning restore IDE0053 // Use expression body for lambda expressions
+ ExpandItCommand = ReactiveCommand.Create(() => IsExpanded = !IsExpanded);
ExpandItCommand.ThrownExceptions
.ObserveOn(RxApp.TaskpoolScheduler)

Change edit property declaration to use expression body for lambda expressions