Files
Toolkit2/Toolkit.Foundation/AggerateEventArgs.cs
T
2024-05-19 22:21:18 +01:00

31 lines
726 B
C#

namespace Toolkit.Foundation;
public record Aggerate
{
public static AggerateEventArgs<TValue, TOptions> With<TValue, TOptions>(TOptions options) where TOptions : class
{
return new AggerateEventArgs<TValue, TOptions>(options);
}
public static AggerateEventArgs<TValue> With<TValue>()
{
return new AggerateEventArgs<TValue>();
}
}
public record AggerateEventArgs<TValue, TOptions>(TOptions? Options = null) :
IAggerate
where TOptions : class
{
public object? Key { get; init; }
public AggerateMode Mode { get; init; }
}
public record AggerateEventArgs<TValue> :
IAggerate
{
public object? Key { get; init; }
public AggerateMode Mode { get; init; }
}