Exemple #1
0
        private static void CalculateOwnership(DlcOwnershipInput dlcOwnershipInput, string outputDirPath, bool convertEncoding)
        {
            var dlcFuncs = new DlcFunctions();

            var ownershipDetails = new DlcFunctions().CalculateOwnership(dlcOwnershipInput);

            WriteOutputFiles(ownershipDetails, outputDirPath, convertEncoding);
        }
        public List <DlcMatch <OfficialDlcItem, DlcTuningItem> > CheckDlcLists(DlcOwnershipInput input)
        {
            var officialDlcList = GetOfficialDlcList(input.OfficialDlcSource, input.OfficialDlcSongNodeSelector, input.RemapOfficialEntries);
            var tuningDlcList   = GetTuningDlcList(input.TuningSource);

            var stringCleaner      = new StringCleaner(true, true, true, true);
            var dlcMatchCalculator = new DlcMatchCalculator(stringCleaner);
            var dlcMatches         = dlcMatchCalculator.GetDlcMatches(officialDlcList.DlcList, tuningDlcList.DlcList);

            return(dlcMatches);
        }
Exemple #3
0
        private static void CheckDlc(DlcOwnershipInput dlcOwnershipInput, string outputDirPath, bool convertUnicodeCharacters)
        {
            var dlcCheckResults = new DlcFunctions().CheckDlcLists(dlcOwnershipInput);
            var dlcListWriter   = new DlcListWriter(new StringCleaner(false, convertUnicodeCharacters, false, false));

            var officialUnmatched = dlcCheckResults.Where(x => x.MatchResult == MatchResultType.UnmatchedLeftDlc).Select(x => x.LeftDlc).ToList();
            var tuningsUnmatched  = dlcCheckResults.Where(x => x.MatchResult == MatchResultType.UnmatchedRightDlc).Select(x => x.RightDlc).ToList();

            dlcListWriter.WriteOfficialDlcToFile(officialUnmatched, Path.Combine(outputDirPath, "official_not_matched_to_tunings.csv"));
            dlcListWriter.WriteDlcListToFile(tuningsUnmatched, Path.Combine(outputDirPath, "tunings_not_match_to_official.csv"));
        }
        public DlcOwnership CalculateOwnership(DlcOwnershipInput input)
        {
            var officialDlcList = GetOfficialDlcList(input.OfficialDlcSource, input.OfficialDlcSongNodeSelector, input.RemapOfficialEntries);
            var existingDlcList = GetExistingDlcList(input.DlcFolder2014, input.DlcFolder2012);

            var stringCleaner          = new StringCleaner(true, true, false, false);
            var dlcSortCalculator      = new DlcSortCalculator(stringCleaner);
            var dlcMatchCalculator     = new DlcMatchCalculator(stringCleaner);
            var dlcOwnershipCalculator = new DlcOwnershipCalculator(dlcSortCalculator, dlcMatchCalculator);

            return(dlcOwnershipCalculator.Calculate(officialDlcList, existingDlcList));
        }