Add first event with a key value
This commit is contained in:
@@ -5,4 +5,8 @@ public record Activate
|
|||||||
public static ActivateEventArgs<TValue> As<TValue>(TValue value) => new(value);
|
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<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());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,3 +14,18 @@ public record ActivateEventArgs<TValue>
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public record ActivateEventArgs<TKey, TValue>
|
||||||
|
{
|
||||||
|
public TValue? Value { get; }
|
||||||
|
|
||||||
|
public ActivateEventArgs(TValue value)
|
||||||
|
{
|
||||||
|
Value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActivateEventArgs()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user