From b9a0b36823144da525c319c71a532f6bda849a04 Mon Sep 17 00:00:00 2001 From: Kristoffer Tungland Date: Mon, 4 Nov 2024 12:11:43 +0100 Subject: [PATCH] Updated nuget demo --- src/MVVMFluent.NugetDemo/MVVMFluent.NugetDemo.csproj | 2 +- src/MVVMFluent.NugetDemo/MainViewModel.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MVVMFluent.NugetDemo/MVVMFluent.NugetDemo.csproj b/src/MVVMFluent.NugetDemo/MVVMFluent.NugetDemo.csproj index 93490b5..7cfb88f 100644 --- a/src/MVVMFluent.NugetDemo/MVVMFluent.NugetDemo.csproj +++ b/src/MVVMFluent.NugetDemo/MVVMFluent.NugetDemo.csproj @@ -10,7 +10,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/MVVMFluent.NugetDemo/MainViewModel.cs b/src/MVVMFluent.NugetDemo/MainViewModel.cs index edfaa73..23f3553 100644 --- a/src/MVVMFluent.NugetDemo/MainViewModel.cs +++ b/src/MVVMFluent.NugetDemo/MainViewModel.cs @@ -18,7 +18,7 @@ public string? Input set => When(value).Required().Notify(AsyncCommand, OkCommand).Set(); } - public Command OkCommand => Do(() => ShowDialog(Input)).IfValid(nameof(Input)); + public FluentCommand OkCommand => Do(() => ShowDialog(Input)).IfValid(nameof(Input)); private bool CanExecute() { @@ -27,7 +27,7 @@ private bool CanExecute() public bool ThrowException { get => Get(false); set => Set(value); } - public AsyncCommand AsyncCommand => Do(ShowDialogAsync).If(CanExecute).Handle(HandleException).ConfigureAwait(false); + public AsyncFluentCommand AsyncCommand => Do(ShowDialogAsync).If(CanExecute).Handle(HandleException).ConfigureAwait(false); private void HandleException(Exception exception) { @@ -54,7 +54,7 @@ private async Task ShowDialogAsync(CancellationToken cancellationToken) ShowDialog(Input); } - public Command HelpCommand => Do(ShowDialog); + public FluentCommand HelpCommand => Do(ShowDialog); private void ShowDialog(string? input) {