Add first event with a key value

This commit is contained in:
Dan Clark
2024-11-29 21:22:18 +00:00
parent cbc0be4c3d
commit 0aaa236cad
2 changed files with 19 additions and 0 deletions
+4
View File
@@ -5,4 +5,8 @@ public record Activate
public static ActivateEventArgs<TValue> As<TValue>(TValue value) => new(value);
public static ActivateEventArgs<TValue> As<TValue>() where TValue : new() => new(new TValue());
public static ActivateEventArgs<TKey, TValue> As<TKey, TValue>(TValue value) => new(value);
public static ActivateEventArgs<TKey, TValue> As<TKey, TValue>() where TValue : new() => new(new TValue());
}
+15
View File
@@ -12,5 +12,20 @@ public record ActivateEventArgs<TValue>
public ActivateEventArgs()
{
}
}
public record ActivateEventArgs<TKey, TValue>
{
public TValue? Value { get; }
public ActivateEventArgs(TValue value)
{
Value = value;
}
public ActivateEventArgs()
{
}
}