Files
mixtape/Finch.Raven/Indexes/FinchIndexExtensions.cs
T
2026-04-07 14:23:29 +02:00

16 lines
496 B
C#

namespace Finch.Raven;
public static class FinchIndexExtensions
{
internal static void RunModifiers<T>(this T index, RavenOptions options) where T : IFinchIndexDefinition
{
IEnumerable<RavenIndexModifiersOptions.Modifier> modifiers = options.Indexes.Modifiers.GetAllForType(index.GetType());
foreach (RavenIndexModifiersOptions.Modifier modifier in modifiers)
{
Action<IFinchIndexDefinition> action = modifier.Modify.Compile();
action.Invoke(index);
}
}
}