From 70f1908c0f7c29c5d6e4091cf905417da637acf8 Mon Sep 17 00:00:00 2001 From: TheXamlGuy Date: Mon, 30 Sep 2024 17:04:58 +0100 Subject: [PATCH] Added PersistEventArgs --- Toolkit.Foundation/Persist.cs | 8 ++++++++ Toolkit.Foundation/PersistEventArgs.cs | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 Toolkit.Foundation/Persist.cs create mode 100644 Toolkit.Foundation/PersistEventArgs.cs diff --git a/Toolkit.Foundation/Persist.cs b/Toolkit.Foundation/Persist.cs new file mode 100644 index 0000000..2f8a75f --- /dev/null +++ b/Toolkit.Foundation/Persist.cs @@ -0,0 +1,8 @@ +namespace Toolkit.Foundation; + +public class Persist +{ + public static PersistEventArgs As(TSender sender) => new(sender); + + public static PersistEventArgs As() where TSender : new() => new(new TSender()); +} \ No newline at end of file diff --git a/Toolkit.Foundation/PersistEventArgs.cs b/Toolkit.Foundation/PersistEventArgs.cs new file mode 100644 index 0000000..8322b23 --- /dev/null +++ b/Toolkit.Foundation/PersistEventArgs.cs @@ -0,0 +1,3 @@ +namespace Toolkit.Foundation; + +public record PersistEventArgs(TSender? Sender = default); \ No newline at end of file