diff --git a/src/Prism.Core/Dialogs/DialogCloseEvent.cs b/src/Prism.Core/Dialogs/DialogCloseEvent.cs
index c6102399a5..83d09c3474 100644
--- a/src/Prism.Core/Dialogs/DialogCloseEvent.cs
+++ b/src/Prism.Core/Dialogs/DialogCloseEvent.cs
@@ -2,6 +2,7 @@
using System.ComponentModel;
using System.Threading.Tasks;
+#nullable enable
namespace Prism.Dialogs;
///
@@ -16,7 +17,7 @@ public struct DialogCloseEvent
///
public DialogCloseEvent()
{
- _callback = null;
+ _callback = () => { };
}
///
@@ -43,7 +44,7 @@ public DialogCloseEvent(Func callback)
/// Invokes the initialized delegate with no .
///
public void Invoke() =>
- Invoke(null);
+ Invoke(new DialogParameters());
///
/// Invokes the initialized delegate with the specified .
@@ -51,8 +52,6 @@ public void Invoke() =>
/// The .
public async void Invoke(IDialogParameters parameters)
{
- parameters ??= new DialogParameters();
-
switch(_callback)
{
case Action actionCallback: