From 149841df98791343b6399f3ceeae9d01e29397f0 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Fri, 29 Dec 2023 17:21:31 +0330 Subject: [PATCH] add OnExceptionHandler --- .../ApiBaseViewModel.cs | 15 ++++++++++++--- .../EasyMicroservices.UI.Cores.Mvvm.csproj | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/CSharp/Cores/EasyMicroservices.UI.Cores.Mvvm/ApiBaseViewModel.cs b/src/CSharp/Cores/EasyMicroservices.UI.Cores.Mvvm/ApiBaseViewModel.cs index fcd872f..cc90585 100644 --- a/src/CSharp/Cores/EasyMicroservices.UI.Cores.Mvvm/ApiBaseViewModel.cs +++ b/src/CSharp/Cores/EasyMicroservices.UI.Cores.Mvvm/ApiBaseViewModel.cs @@ -9,7 +9,10 @@ namespace EasyMicroservices.UI.Cores; /// public class ApiBaseViewModel : BaseViewModel { - + /// + /// + /// + public Func> OnExceptionHandler { get; set; } /// /// /// @@ -30,7 +33,7 @@ public async virtual Task ExecuteApi(Func> getServerResult if (response.IsSuccess) await onSuccess(response); else - await DisplayServerError(response.Error); + await InternalDisplayServerError(response.Error); } catch (Exception ex) { @@ -64,7 +67,7 @@ public virtual async Task ExecuteApi(Func> getServerResult, Func> getServerResult, FuncAnyCPU;x64;x86 EasyMicroservices true - 0.0.0.13 + 0.0.0.14 Model View View Model EasyMicroservices@gmail.com mvvm,mvpvm,modelview,modelviewviewmodel