Update ValidateEventArgs
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
public record Validate
|
||||
{
|
||||
public static ValidateEventArgs<TValue> As<TValue>(TValue value) =>
|
||||
new(value);
|
||||
public static ValidateEventArgs<TSender> As<TSender>(TSender sender) =>
|
||||
new(sender);
|
||||
|
||||
public static ValidateEventArgs<TValue> As<TValue>() where TValue : new() =>
|
||||
new(new TValue());
|
||||
public static ValidateEventArgs<TSender> As<TSender>() where TSender : new() =>
|
||||
new(new TSender());
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public record ValidateEventArgs<TValue>(TValue Value);
|
||||
public record ValidateEventArgs<TSender>(TSender? Sender = default);
|
||||
Reference in New Issue
Block a user