eliminated interface.
MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/DialogViewModelBase.cs
WalletWasabi.Fluent/ViewModels/Dialogs/DialogViewModelBase.cs
@@ -5,13 +5,21 @@ using ReactiveUI;
namespace WalletWasabi.Fluent.ViewModels.Dialogs
{
+ /// <summary>
+ /// CommonBase class.
+ /// </summary>
+ public abstract class DialogViewModelBase : ViewModelBase
+ {
+ // Intended to be empty.
+ }
+
/// <summary>
/// Base ViewModel class for Dialogs that returns a value back.
/// Do not reuse all types derived from this after calling ShowDialogAsync.
/// Spawn a new instance instead after that.
/// </summary>
/// <typeparam name="TResult">The type of the value to be returned when the dialog is finished.</typeparam>
- public abstract class DialogViewModelBase<TResult> : ViewModelBase, IDialogViewModel
+ public abstract class DialogViewModelBase<TResult> : DialogViewModelBase
{
private readonly IDisposable _disposable;
private bool _isDialogOpen;

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/IDialogHost.cs
WalletWasabi.Fluent/ViewModels/Dialogs/IDialogHost.cs
@@ -8,6 +8,6 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs
/// <summary>
/// The currently active dialog. The modal dialog UI should close when this is null.
/// </summary>
- IDialogViewModel CurrentDialog { get; set; }
+ DialogViewModelBase CurrentDialog { get; set; }
}
}

DELETE
WalletWasabi.Fluent/ViewModels/Dialogs/IDialogViewModel.cs
-namespace WalletWasabi.Fluent.ViewModels.Dialogs
-{
- /// <summary>
- /// Interface that abstracts <see cref="DialogViewModelBase{TResult}"/>.
- /// </summary>
- public interface IDialogViewModel
- {
- /// <summary>
- /// Gets or sets if the dialog is opened/closed.
- /// </summary>
- bool IsDialogOpen { get; set; }
- }
-}

MODIFY
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
@@ -13,7 +13,7 @@ namespace WalletWasabi.Fluent.ViewModels
private Global _global;
private StatusBarViewModel _statusBar;
private string _title = "Wasabi Wallet";
- private IDialogViewModel _currentDialog;
+ private DialogViewModelBase _currentDialog;
private NavBarViewModel _navBar;
public MainViewModel(Global global)
{
@@ -36,7 +36,7 @@ namespace WalletWasabi.Fluent.ViewModels
public Network Network { get; }
- public IDialogViewModel CurrentDialog
+ public DialogViewModelBase CurrentDialog
{
get => _currentDialog;
set => this.RaiseAndSetIfChanged(ref _currentDialog, value);

eliminated interface.