<commit_before>﻿using System;

namespace Assent
{
    public interface IConfiguration<T>
    {
        INamer Namer { get; }
        IReporter Reporter { get; }
        T Extension { get; }
        IReaderWriter<T> ReaderWriter { get; }
        IComparer<T> Comparer { get; }
    }

    public class Configuration : IConfiguration<string>
    {
        public Configuration()
        {
            Reporter = new DiffReporter();
            Comparer = new DefaultStringComparer();
            Extension = "txt";
            ReaderWriter = new StringReaderWriter();
            Namer = new DefaultNamer();
        }

        private Configuration(Configuration basedOn)
        {
            Namer = basedOn.Namer;
            Comparer = basedOn.Comparer;
            Reporter = basedOn.Reporter;
            Extension = basedOn.Extension;
            ReaderWriter = basedOn.ReaderWriter;
        }

        public INamer Namer { get; private set; }
        public IReporter Reporter { get; private set; }
        public string Extension { get; private set; }
        public IReaderWriter<string> ReaderWriter { get; private set; }
        public IComparer<string> Comparer { get; private set; }

        public Configuration WithNamer(INamer namer)
        {
            return new Configuration(this)
            {
                Namer = namer
            };
        }

        public Configuration UsingReporter(IReporter reporter)
        {
            return new Configuration(this)
            {<commit_msg>Changed method to `UsingNamer`<commit_after>﻿using System;

namespace Assent
{
    public interface IConfiguration<T>
    {
        INamer Namer { get; }
        IReporter Reporter { get; }
        T Extension { get; }
        IReaderWriter<T> ReaderWriter { get; }
        IComparer<T> Comparer { get; }
    }

    public class Configuration : IConfiguration<string>
    {
        public Configuration()
        {
            Reporter = new DiffReporter();
            Comparer = new DefaultStringComparer();
            Extension = "txt";
            ReaderWriter = new StringReaderWriter();
            Namer = new DefaultNamer();
        }

        private Configuration(Configuration basedOn)
        {
            Namer = basedOn.Namer;
            Comparer = basedOn.Comparer;
            Reporter = basedOn.Reporter;
            Extension = basedOn.Extension;
            ReaderWriter = basedOn.ReaderWriter;
        }

        public INamer Namer { get; private set; }
        public IReporter Reporter { get; private set; }
        public string Extension { get; private set; }
        public IReaderWriter<string> ReaderWriter { get; private set; }
        public IComparer<string> Comparer { get; private set; }

        public Configuration UsingNamer(INamer namer)
        {
            return new Configuration(this)
            {
                Namer = namer
            };
        }

        public Configuration UsingReporter(IReporter reporter)
        {
            return new Configuration(this)
            {
{'fraction_non_alphanumeric': 0.07687253613666228, 'fraction_numerical': 0.0, 'mean_word_length': 1.8038674033149171, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5496349', 'n_tokens_mistral': 780, 'n_tokens_neox': 757, 'n_words': 205}