no need for extension method.
MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/RecoverWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/RecoverWalletViewModel.cs
@@ -80,7 +80,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
try
{
- var result = await this.NavigateDialog(
+ var result = await NavigateDialog(
new EnterPasswordViewModel(
navigationState,
NavigationTarget.DialogScreen,

MODIFY
WalletWasabi.Fluent/ViewModels/AddWalletPageViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWalletPageViewModel.cs
@@ -50,7 +50,7 @@ namespace WalletWasabi.Fluent.ViewModels
CreateWalletCommand = ReactiveCommand.CreateFromTask(
async () =>
{
- var result = await this.NavigateDialog(new EnterPasswordViewModel(
+ var result = await NavigateDialog(new EnterPasswordViewModel(
navigationState,
NavigationTarget.DialogScreen,
"Type the password of the wallet and click Continue."));

DELETE
WalletWasabi.Fluent/ViewModels/RoutableExtensions.cs
-using System.Threading.Tasks;
-using WalletWasabi.Fluent.ViewModels.Dialogs;
-
-namespace WalletWasabi.Fluent.ViewModels
-{
- public static class RoutableExtensions
- {
- public static async Task<TResult> NavigateDialog<TResult>(this RoutableViewModel vm, DialogViewModelBase<TResult> dialog)
- {
- TResult result;
-
- using (vm.NavigateTo(dialog, NavigationTarget.DialogScreen))
- {
- result = await dialog.GetDialogResultAsync();
- }
-
- return result;
- }
- }
-}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/RoutableViewModel.cs
WalletWasabi.Fluent/ViewModels/RoutableViewModel.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Disposables;
+using System.Threading.Tasks;
using System.Windows.Input;
using ReactiveUI;
using WalletWasabi.Fluent.ViewModels.Dialogs;
@@ -48,6 +49,18 @@ namespace WalletWasabi.Fluent.ViewModels
public ICommand CancelCommand { get; protected set; }
+ public async Task<TResult> NavigateDialog<TResult>(DialogViewModelBase<TResult> dialog)
+ {
+ TResult result;
+
+ using (NavigateTo(dialog, NavigationTarget.DialogScreen))
+ {
+ result = await dialog.GetDialogResultAsync();
+ }
+
+ return result;
+ }
+
public IDisposable NavigateTo(RoutableViewModel viewModel, NavigationTarget navigationTarget, bool resetNavigation = false)
{
switch (navigationTarget)

no need for extension method.