Files
mixtape/Finch.Raven/Indexes/FinchIndexExtensions.cs
T

16 lines
496 B
C#
Raw Normal View History

2026-04-07 14:23:29 +02:00
namespace Finch.Raven;
2022-12-07 14:05:11 +01:00
2026-04-07 14:23:29 +02:00
public static class FinchIndexExtensions
2022-12-07 14:05:11 +01:00
{
2026-04-07 14:23:29 +02:00
internal static void RunModifiers<T>(this T index, RavenOptions options) where T : IFinchIndexDefinition
2022-12-07 14:05:11 +01:00
{
IEnumerable<RavenIndexModifiersOptions.Modifier> modifiers = options.Indexes.Modifiers.GetAllForType(index.GetType());
foreach (RavenIndexModifiersOptions.Modifier modifier in modifiers)
{
2026-04-07 14:23:29 +02:00
Action<IFinchIndexDefinition> action = modifier.Modify.Compile();
2022-12-07 14:05:11 +01:00
action.Invoke(index);
}
}
}