Added PersistEventArgs

This commit is contained in:
TheXamlGuy
2024-09-30 17:04:58 +01:00
parent 6c7a6e9cf5
commit 70f1908c0f
2 changed files with 11 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
namespace Toolkit.Foundation;
public class Persist
{
public static PersistEventArgs<TSender> As<TSender>(TSender sender) => new(sender);
public static PersistEventArgs<TSender> As<TSender>() where TSender : new() => new(new TSender());
}
+3
View File
@@ -0,0 +1,3 @@
namespace Toolkit.Foundation;
public record PersistEventArgs<TSender>(TSender? Sender = default);