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