using System; using System.Collections.Generic; using zero.Core.Database; using zero.Core.Options; namespace zero.Core.Extensions { public static class ZeroIndexExtensions { internal static void RunModifiers(this T index, IZeroOptions options) where T : IZeroIndexDefinition { IEnumerable modifiers = options.Raven.Indexes.Modifiers.GetAllForType(index.GetType()); foreach (RavenIndexModifiersOptions.Modifier modifier in modifiers) { Action action = modifier.Modify.Compile(); action.Invoke(index); } } } }