From 4b732791bd370b1ac8e50b86d4489975a904b566 Mon Sep 17 00:00:00 2001 From: TheXamlGuy Date: Sun, 29 Sep 2024 13:13:09 +0100 Subject: [PATCH] Update ValidateEventArgs --- Toolkit.Foundation/Validate.cs | 8 ++++---- Toolkit.Foundation/ValidateEventArgs.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Toolkit.Foundation/Validate.cs b/Toolkit.Foundation/Validate.cs index 1a1e9d1..90894b1 100644 --- a/Toolkit.Foundation/Validate.cs +++ b/Toolkit.Foundation/Validate.cs @@ -2,9 +2,9 @@ public record Validate { - public static ValidateEventArgs As(TValue value) => - new(value); + public static ValidateEventArgs As(TSender sender) => + new(sender); - public static ValidateEventArgs As() where TValue : new() => - new(new TValue()); + public static ValidateEventArgs As() where TSender : new() => + new(new TSender()); } \ No newline at end of file diff --git a/Toolkit.Foundation/ValidateEventArgs.cs b/Toolkit.Foundation/ValidateEventArgs.cs index ec1b6e1..409a873 100644 --- a/Toolkit.Foundation/ValidateEventArgs.cs +++ b/Toolkit.Foundation/ValidateEventArgs.cs @@ -1,3 +1,3 @@ namespace Toolkit.Foundation; -public record ValidateEventArgs(TValue Value); \ No newline at end of file +public record ValidateEventArgs(TSender? Sender = default); \ No newline at end of file