<commit_before>﻿namespace TcbInternetSolutions.Vulcan.Core.Extensions
{

    using EPiServer;
    using EPiServer.Core;
    using EPiServer.Logging;
    using EPiServer.Security;
    using EPiServer.ServiceLocation;
    using EPiServer.Web.Routing;
    using Nest;
    using Newtonsoft.Json.Linq;
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Linq;
    using TcbInternetSolutions.Vulcan.Core;
    using TcbInternetSolutions.Vulcan.Core.Implementation;
    using static VulcanFieldConstants;

    public static class IVulcanClientExtensions
    {
        private static readonly UrlResolver urlResolver = ServiceLocator.Current.GetInstance<UrlResolver>();

        public static Injected<IVulcanHandler> VulcanHandler { get; set; }

        internal static List<IVulcanCustomizer> Customizers;
        internal static List<Type> CustomizerTypes;

        static IVulcanClientExtensions()
        {
            CustomizerTypes = typeof(IVulcanCustomizer).GetSearchTypesFor(VulcanFieldConstants.DefaultFilter);
            Customizers = new List<IVulcanCustomizer>();

            foreach (var type in CustomizerTypes)
                Customizers.Add((IVulcanCustomizer)Activator.CreateInstance(type));
        }

        /// <summary>
        /// Allows for customizations on analyzers and mappings.
        /// </summary>
        /// <param name="client"></param>
        /// <param name="logger"></param>
        internal static void RunCustomizers(this IVulcanClient client, ILogger logger)
        {
            foreach (var customizer in Customizers)<commit_msg>made RunCustomizers public to allow for use on custom getclient functions.<commit_after>﻿namespace TcbInternetSolutions.Vulcan.Core.Extensions
{

    using EPiServer;
    using EPiServer.Core;
    using EPiServer.Logging;
    using EPiServer.Security;
    using EPiServer.ServiceLocation;
    using EPiServer.Web.Routing;
    using Nest;
    using Newtonsoft.Json.Linq;
    using System;
    using System.Collections.Generic;
    using System.Globalization;
    using System.Linq;
    using TcbInternetSolutions.Vulcan.Core;
    using TcbInternetSolutions.Vulcan.Core.Implementation;
    using static VulcanFieldConstants;

    public static class IVulcanClientExtensions
    {
        private static readonly UrlResolver urlResolver = ServiceLocator.Current.GetInstance<UrlResolver>();

        public static Injected<IVulcanHandler> VulcanHandler { get; set; }

        internal static List<IVulcanCustomizer> Customizers;
        internal static List<Type> CustomizerTypes;

        static IVulcanClientExtensions()
        {
            CustomizerTypes = typeof(IVulcanCustomizer).GetSearchTypesFor(VulcanFieldConstants.DefaultFilter);
            Customizers = new List<IVulcanCustomizer>();

            foreach (var type in CustomizerTypes)
                Customizers.Add((IVulcanCustomizer)Activator.CreateInstance(type));
        }

        /// <summary>
        /// Allows for customizations on analyzers and mappings.
        /// </summary>
        /// <param name="client"></param>
        /// <param name="logger"></param>
        public static void RunCustomizers(this IVulcanClient client, ILogger logger)
        {
            foreach (var customizer in Customizers)
{'fraction_non_alphanumeric': 0.0807378288478984, 'fraction_numerical': 0.0, 'mean_word_length': 3.0145631067961167, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5528538', 'n_tokens_mistral': 892, 'n_tokens_neox': 866, 'n_words': 201}