コード例 #1
0
        static async Task Main()
        {
            CultureInfo.CurrentCulture = new CultureInfo("en-US");

            // Create Resources folders if they don't exist
            Directory.CreateDirectory(Paths.INPUT);
            Directory.CreateDirectory(Paths.OUTPUT);

            Spinner spinner = new Spinner();

            spinner.Start();

            MetadataResources resources = new MetadataResources();

            IEnumerable <MetadataExporter> exporters = new List <MetadataExporter>()
            {
                new ItemParser(resources),
                new ItemOptionsParser(resources),
                new ItemOptionRangeParser(resources),
                new MapEntityParser(resources),
                new MapParser(resources),
                new SkillParser(resources),
                new InsigniaParser(resources),
                new ExpParser(resources),
                new QuestParser(resources),
                new ScriptParser(resources),
                new GuildParser(resources),
                new PrestigeParser(resources),
                new TrophyParser(resources),
                new RecipeParser(resources),
                new MasteryParser(resources),
                new NpcParser(resources),
                new ChatStickerParser(resources),
                new ShopParser(),
                new ItemExchangeScrollParser(resources),
                new MasteryFactorParser(resources),
                new PremiumClubPackageParser(resources),
                new PremiumClubDailyBenefitParser(resources),
                new InstrumentInfoParser(resources),
                new InstrumentCategoryInfoParser(resources),
                new BeautyParser(),
                new ColorPaletteParser(resources),
                new GachaParser(resources),
                new MeretMarketParser(),
                new ItemExtractionParser(resources),
                new FishParser(resources),
                new FishingSpotParser(resources),
                new FishingRodParser(resources)
            };

            IEnumerable <Task> tasks = exporters.Select(exporter => Task.Run(() => exporter.Export()));

            await Task.WhenAll(tasks);

            spinner.Stop();
            TimeSpan runtime = spinner.GetRuntime();

            Console.WriteLine($"\rExporting finished in {runtime.Minutes} minutes and {runtime.Seconds} seconds");
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: wevvin/MapleServer2
        static async Task Main()
        {
            CultureInfo.CurrentCulture = new CultureInfo("en-US");

            // Create Resources folders if they don't exist
            Directory.CreateDirectory(Paths.INPUT);
            Directory.CreateDirectory(Paths.OUTPUT);

            Spinner spinner = new Spinner();

            spinner.Start();

            MetadataResources resources = new MetadataResources();

            IEnumerable <MetadataExporter> exporters = new List <MetadataExporter>()
            {
                new ItemParser(resources),
                new ItemStatsParser(resources),
                new MapEntityParser(resources),
                new MapParser(resources),
                new SkillParser(resources),
                new InsigniaParser(resources),
                new ExpParser(resources),
                new QuestParser(resources),
                new ScriptParser(resources),
                new GuildParser(resources),
                new PrestigeParser(resources),
                new AchieveParser(resources),
                new RecipeParser(resources),
                new MasteryParser(resources),
                new NpcParser(resources),
                new ChatStickerParser(resources),
                new ShopParser(),
                new ItemExchangeScrollParser(resources),
            };

            IEnumerable <Task> tasks = exporters.Select(exporter => Task.Run(() => exporter.Export()));

            await Task.WhenAll(tasks);

            spinner.Stop();
            TimeSpan runtime = spinner.GetRuntime();

            Console.WriteLine($"\rExporting finished in {runtime.Minutes} minutes and {runtime.Seconds} seconds");
        }