Make it possible to feed in options to the Enumerate handler
This commit is contained in:
@@ -1,3 +1,23 @@
|
||||
namespace Toolkit.Foundation;
|
||||
|
||||
public record Enumerate<TValue>(object? Key = null);
|
||||
public record Enumerate<TValue> : IEnumerate
|
||||
{
|
||||
public object? Key { get; init; }
|
||||
|
||||
public static Enumerate<TValue, TOptions> With<TOptions>(TOptions options) where TOptions : class
|
||||
{
|
||||
return new Enumerate<TValue, TOptions>(options);
|
||||
}
|
||||
}
|
||||
|
||||
public interface IEnumerate
|
||||
{
|
||||
object? Key { get; init; }
|
||||
}
|
||||
|
||||
|
||||
public record Enumerate<TValue, TOptions>(TOptions? Options = null) : IEnumerate
|
||||
where TOptions : class
|
||||
{
|
||||
public object? Key { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user