Make it possible to feed in options to the Enumerate handler

This commit is contained in:
TheXamlGuy
2024-05-05 20:43:17 +01:00
parent daf746aa86
commit 40845bb5b3
4 changed files with 36 additions and 6 deletions
+21 -1
View File
@@ -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; }
}