<commit_before>﻿using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;

namespace FluentMvc
{
    public class FluentMvcFilterProvider : FilterAttributeFilterProvider
    {
        private readonly IFluentMvcResolver fluentMvcResolver;

        public FluentMvcFilterProvider(IFluentMvcResolver fluentMvcResolver)
        {
            this.fluentMvcResolver = fluentMvcResolver;
        }

        public override IEnumerable<Filter> GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
        {
            var attributeFilters =  base.GetFilters(controllerContext, actionDescriptor);
            fluentMvcResolver.BuildUpFilters(attributeFilters);

            var filterInfo = new FilterInfo();
            GetFiltersFromRegistry(controllerContext, actionDescriptor, filterInfo);

            return attributeFilters.Concat(CreateFilters(filterInfo));
        }

        private void GetFiltersFromRegistry(ControllerContext controllerContext, ActionDescriptor actionDescriptor, FilterInfo filterInfo)
        {
            var actionFilterSelector = new ActionFilterSelector(controllerContext, actionDescriptor, actionDescriptor.ControllerDescriptor);
            fluentMvcResolver.AddFiltersTo(filterInfo, actionFilterSelector);
        }

        private IEnumerable<Filter> CreateFilters(FilterInfo filterInfo)
        {
            foreach (var filter in filterInfo.AuthorizationFilters)
            {
                yield return new Filter(filter, FilterScope.Global, null);
            }

            foreach (var filter in filterInfo.ExceptionFilters)
            {
                yield return new Filter(filter, FilterScope.Global, null);
            }

            foreach (var filter in filterInfo.ActionFilters)
            {
                yield return new Filter(filter, FilterScope.Global, null);
            }

            foreach (var filter in filterInfo.ResultFilters)
            {
                yield return new Filter(filter, FilterScope.Global, null);
            }
        }
    }
}<commit_msg>Moved silly line<commit_after>﻿using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;

namespace FluentMvc
{
    public class FluentMvcFilterProvider : FilterAttributeFilterProvider
    {
        private readonly IFluentMvcResolver fluentMvcResolver;

        public FluentMvcFilterProvider(IFluentMvcResolver fluentMvcResolver)
        {
            this.fluentMvcResolver = fluentMvcResolver;
        }

        public override IEnumerable<Filter> GetFilters(ControllerContext controllerContext, ActionDescriptor actionDescriptor)
        {
            var attributeFilters =  base.GetFilters(controllerContext, actionDescriptor);
            fluentMvcResolver.BuildUpFilters(attributeFilters);

            var filterInfo = new FilterInfo();
            GetFiltersFromRegistry(controllerContext, actionDescriptor, filterInfo);

            return attributeFilters.Concat(CreateFilters(filterInfo));
        }

        private void GetFiltersFromRegistry(ControllerContext controllerContext, ActionDescriptor actionDescriptor, FilterInfo filterInfo)
        {
            var actionFilterSelector = new ActionFilterSelector(controllerContext, actionDescriptor, actionDescriptor.ControllerDescriptor);
            fluentMvcResolver.AddFiltersTo(filterInfo, actionFilterSelector);
        }

        private IEnumerable<Filter> CreateFilters(FilterInfo filterInfo)
        {
            foreach (var filter in filterInfo.AuthorizationFilters)
            {
                yield return new Filter(filter, FilterScope.Global, null);
            }
            
            foreach (var filter in filterInfo.ExceptionFilters)
            {
                yield return new Filter(filter, FilterScope.Global, null);
            }

            foreach (var filter in filterInfo.ActionFilters)
            {
                yield return new Filter(filter, FilterScope.Global, null);
            }

            foreach (var filter in filterInfo.ResultFilters)
            {
                yield return new Filter(filter, FilterScope.Global, null);
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.05993766482857828, 'fraction_numerical': 0.0, 'mean_word_length': 2.5506382978723403, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '238455', 'n_tokens_mistral': 927, 'n_tokens_neox': 956, 'n_words': 214}