<commit_before>﻿using System;
using System.Collections.Generic;

namespace EventStreams.Persistence.FileSystem {
    using Core;
    using Serialization.Events;

    public class FileSystemPersistenceStrategy : IPersistenceStrategy {
        private readonly RepositoryHierarchy _repositoryHierarchy;
        private readonly FileSystemLoader _loader;
        private readonly FileSystemStorer _storer;

        public FileSystemPersistenceStrategy(RepositoryHierarchy repositoryHierarchy, IEventReaderWriterPair eventReaderWriterPair) {
            _repositoryHierarchy = repositoryHierarchy;
            if (repositoryHierarchy == null) throw new ArgumentNullException("repositoryHierarchy");
            if (eventReaderWriterPair == null) throw new ArgumentNullException("eventReaderWriterPair");

            _storer = new FileSystemStorer(repositoryHierarchy, eventReaderWriterPair.Writer);
            _loader = new FileSystemLoader(repositoryHierarchy, eventReaderWriterPair.Reader);
        }

        public void Store(Guid identity, IEnumerable<IStreamedEvent> eventsToAppend) {
            _storer.Store(identity, eventsToAppend);
        }

        public IEnumerable<IStreamedEvent> Load(Guid identity) {
            return _loader.Load(identity);
        }
    }
}
<commit_msg>Remove unused instance variable in FileSystemPersistenceStrategy.<commit_after>﻿using System;
using System.Collections.Generic;

namespace EventStreams.Persistence.FileSystem {
    using Core;
    using Serialization.Events;

    public class FileSystemPersistenceStrategy : IPersistenceStrategy {
        private readonly FileSystemLoader _loader;
        private readonly FileSystemStorer _storer;

        public FileSystemPersistenceStrategy(RepositoryHierarchy repositoryHierarchy, IEventReaderWriterPair eventReaderWriterPair) {
            if (repositoryHierarchy == null) throw new ArgumentNullException("repositoryHierarchy");
            if (eventReaderWriterPair == null) throw new ArgumentNullException("eventReaderWriterPair");

            _storer = new FileSystemStorer(repositoryHierarchy, eventReaderWriterPair.Writer);
            _loader = new FileSystemLoader(repositoryHierarchy, eventReaderWriterPair.Reader);
        }

        public void Store(Guid identity, IEnumerable<IStreamedEvent> eventsToAppend) {
            _storer.Store(identity, eventsToAppend);
        }

        public IEnumerable<IStreamedEvent> Load(Guid identity) {
            return _loader.Load(identity);
        }
    }
}

{'fraction_non_alphanumeric': 0.061502530167380304, 'fraction_numerical': 0.0, 'mean_word_length': 3.4463667820069204, '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': '16717', 'n_tokens_mistral': 620, 'n_tokens_neox': 602, 'n_words': 133}