Exemple #1
0
        void InitializePair()
        {
            List <Mod> activeMods = ModContentPackExtension.GetModsFromActive(useVersionChecking);
            List <Mod> saveMods   = ModContentPackExtension.GetModsFromSave(useVersionChecking);
            var        result     = formatter.GetFormattedModPairs(saveMods, activeMods);

            pairs = result.ToList();
        }
        void Test()
        {
            string save = @"Core
1567113677
1848471817
1508850027
818773962
1507748539
839005762
932008009
753498552
1180826364
1837246563
725219116
712141500
715565817
848972794
946390822
935732834
962732083
836308268
1496570408
1188485723
1185269798
1185906628
1185274792
1185276569
1244299809
1185281838
1185265132
1192504741
1185307686
1718190143
1718191613
1880253632
1845154007
1836382920
1814383360
1113137502
1541721856
1055485938
1658356618
1590579367
1542364782
1836900626
1895364938
1823540489
1849183875
1849184079
1895364782
1700683323
1895364585
1865597143
1582570547
761421485
1833163132
1558161673
1907283935
1907283872
1906780517
1854607105
1854610483
1819425140
1888705256
1914064942
1814987817
1814988282
1917061124
826998327
1321849735
850429707
746425621
1501832876
1424338139
1843574431
1446523594
1544626521
1591142767
1346064449
1537869190
725130005
1909914131
1539312975
1713343013
1908437382";

            string     active     = @"Core
1567113677
1848471817
1508850027
818773962
1507748539
839005762
932008009
753498552
1180826364
1837246563
725219116
712141500
715565817
848972794
946390822
935732834
836308268
1496570408
1188485723
1185269798
1185274792
1718190143
1185276569
1718191613
962732083
1185307686
1185265132
1185906628
1055485938
1185281838
1244299809
1508292711
1192504741
1211694919
1845154007
1814383360
1578693166
1854376306
1541721856
1632800575
1658356618
865497369
1590579367
1113137502
1542364782
1836900626
1895364938
1823540489
1849183875
1849184079
1700683323
1895364585
1865597143
1582570547
1558161673
1907283935
1817690190
1895364782
1907283872
832333531
1906780517
1854607105
1917061124
735106432
1819425140
1888705256
1854610483
1814987817
1814988282
850429707
1914064942
746425621
1843574431
1544626521
1591142767
1346064449
1537869190
1216999901
1697864590
1865654125
725130005
1909914131
818322128
1539312975
1713343013
1446523594
1908437382
";
            List <Mod> saveMods   = new List <Mod>();
            List <Mod> activeMods = new List <Mod>();

            using (System.IO.StringReader reader = new System.IO.StringReader(save))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    saveMods.Add(new Mod(line, line)
                    {
                        Identifier = line
                    });
                }
            }

            using (System.IO.StringReader reader = new System.IO.StringReader(active))
            {
                string line;
                while ((line = reader.ReadLine()) != null)
                {
                    activeMods.Add(new Mod(line, line)
                    {
                        Identifier = line
                    });
                }
            }
            result      = formatter.GetFormattedModPairs(saveMods, activeMods).ToList();
            initialized = true;
        }