<commit_before>﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.Composition;
using System.Globalization;
using NuGet;
using NuGetPackageExplorer.Types;

namespace PackageExplorerViewModel {

    [Export(typeof(IMruManager))]
    internal class MruManager : IMruManager {
        private const int MaxFile = 7;
        private readonly ObservableCollection<MruItem> _files;
        private readonly ISettingsManager _settingsManager;

        [System.Diagnostics.CodeAnalysis.SuppressMessage(
            "Microsoft.Performance", 
            "CA1811:AvoidUncalledPrivateCode",
            Justification="Called by MEF")]
        [ImportingConstructor]
        public MruManager(ISettingsManager settingsManager) {
            var savedFiles = settingsManager.GetMruFiles();

            _files = new ObservableCollection<MruItem>();
            for (int i = savedFiles.Count - 1; i >= 0; --i) {
                string s = savedFiles[i];
                MruItem item = ConvertStringToMruItem(s);
                if (item != null) {
                    AddFile(item);
                }
            }

            _settingsManager = settingsManager;
        }

        private void OnApplicationExit() {
            List<string> sc = new List<string>();
            foreach (var item in _files) {<commit_msg>Increase number of MRU files to 10.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.Composition;
using System.Globalization;
using NuGet;
using NuGetPackageExplorer.Types;

namespace PackageExplorerViewModel {

    [Export(typeof(IMruManager))]
    internal class MruManager : IMruManager {
        private const int MaxFile = 10;
        private readonly ObservableCollection<MruItem> _files;
        private readonly ISettingsManager _settingsManager;

        [System.Diagnostics.CodeAnalysis.SuppressMessage(
            "Microsoft.Performance", 
            "CA1811:AvoidUncalledPrivateCode",
            Justification="Called by MEF")]
        [ImportingConstructor]
        public MruManager(ISettingsManager settingsManager) {
            var savedFiles = settingsManager.GetMruFiles();

            _files = new ObservableCollection<MruItem>();
            for (int i = savedFiles.Count - 1; i >= 0; --i) {
                string s = savedFiles[i];
                MruItem item = ConvertStringToMruItem(s);
                if (item != null) {
                    AddFile(item);
                }
            }

            _settingsManager = settingsManager;
        }

        private void OnApplicationExit() {
            List<string> sc = new List<string>();
            foreach (var item in _files) {
{'fraction_non_alphanumeric': 0.08354430379746836, 'fraction_numerical': 0.006148282097649186, 'mean_word_length': 2.398034398034398, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '3196411', 'n_tokens_mistral': 721, 'n_tokens_neox': 684, 'n_words': 170}