From cbe28ff630ce489762aaf9efdb1e9aac1129b704 Mon Sep 17 00:00:00 2001 From: Dan Siegel Date: Sat, 28 Oct 2023 10:14:19 -0600 Subject: [PATCH] chore: update to use DialogCloseListener --- .../ViewModels/NotificationDialogViewModel.cs | 4 ++-- .../StylingDialog/ViewModels/NotificationDialogViewModel.cs | 4 ++-- .../ViewModels/NotificationDialogViewModel.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/26-UsingDialogService/UsingDialogService/ViewModels/NotificationDialogViewModel.cs b/26-UsingDialogService/UsingDialogService/ViewModels/NotificationDialogViewModel.cs index 109f4d2..3344acc 100644 --- a/26-UsingDialogService/UsingDialogService/ViewModels/NotificationDialogViewModel.cs +++ b/26-UsingDialogService/UsingDialogService/ViewModels/NotificationDialogViewModel.cs @@ -27,7 +27,7 @@ public string Title set { SetProperty(ref _title, value); } } - public event Action RequestClose; + public DialogCloseListener RequestClose { get; } protected virtual void CloseDialog(string parameter) { @@ -43,7 +43,7 @@ protected virtual void CloseDialog(string parameter) public virtual void RaiseRequestClose(IDialogResult dialogResult) { - RequestClose?.Invoke(dialogResult); + RequestClose.Invoke(dialogResult); } public virtual bool CanCloseDialog() diff --git a/27-StylingDialog/StylingDialog/ViewModels/NotificationDialogViewModel.cs b/27-StylingDialog/StylingDialog/ViewModels/NotificationDialogViewModel.cs index 6e90408..8c14a09 100644 --- a/27-StylingDialog/StylingDialog/ViewModels/NotificationDialogViewModel.cs +++ b/27-StylingDialog/StylingDialog/ViewModels/NotificationDialogViewModel.cs @@ -27,7 +27,7 @@ public string Title set { SetProperty(ref _title, value); } } - public event Action RequestClose; + public DialogCloseListener RequestClose { get; } protected virtual void CloseDialog(string parameter) { @@ -43,7 +43,7 @@ protected virtual void CloseDialog(string parameter) public virtual void RaiseRequestClose(IDialogResult dialogResult) { - RequestClose?.Invoke(dialogResult); + RequestClose.Invoke(dialogResult); } public virtual bool CanCloseDialog() diff --git a/28-UsingCustomWindow/UsingCustomWindow/ViewModels/NotificationDialogViewModel.cs b/28-UsingCustomWindow/UsingCustomWindow/ViewModels/NotificationDialogViewModel.cs index 85e6a5d..f59deea 100644 --- a/28-UsingCustomWindow/UsingCustomWindow/ViewModels/NotificationDialogViewModel.cs +++ b/28-UsingCustomWindow/UsingCustomWindow/ViewModels/NotificationDialogViewModel.cs @@ -27,7 +27,7 @@ public string Title set { SetProperty(ref _title, value); } } - public event Action RequestClose; + public DialogCloseListener RequestClose { get; } protected virtual void CloseDialog(string parameter) { @@ -43,7 +43,7 @@ protected virtual void CloseDialog(string parameter) public virtual void RaiseRequestClose(IDialogResult dialogResult) { - RequestClose?.Invoke(dialogResult); + RequestClose.Invoke(dialogResult); } public virtual bool CanCloseDialog()