public async Task <ChunithmClientLibrary.PlayerRecord.IPlayerRecordContainer> UpdatePlayerRecordAsync()
        {
            await LoadGlobalMusicDataTable();

            DebugLogger.WriteLine("HighScoreRecord更新の開始");

            ChunithmClientLibrary.PlayerRecord.IPlayerRecordContainer record = new ChunithmClientLibrary.PlayerRecord.PlayerRecordContainer();

            var difficulties = new[]
            {
                Difficulty.Basic,
                Difficulty.Advanced,
                Difficulty.Expert,
                Difficulty.Master,
            };

            foreach (var difficulty in difficulties)
            {
                DebugLogger.WriteLine($"{difficulty} の取得");

                var   musicGenre = chunithmNetConnector.GetMusicGenreAsync(Utility.GENRE_ALL_CODE, difficulty);
                await musicGenre;
                if (!musicGenre.Result.Success)
                {
                    throw new Exception($"{difficulty}の取得に失敗しました");
                }

                var highScoreRecordTable = new HighScoreRecordTable();
                highScoreRecordTable.Add(musicGenre.Result.MusicGenre);
                record.SetTable(highScoreRecordTable, difficulty);
            }

            return(record);
        }
        public void SetTable(IHighScoreRecordTable <IHighScoreRecordTableUnit> record, Difficulty difficulty)
        {
            if (record == null)
            {
                throw new ArgumentNullException(nameof(record));
            }

            switch (difficulty)
            {
            case Difficulty.Basic:
                Basic = new HighScoreRecordTable(record);
                break;

            case Difficulty.Advanced:
                Advanced = new HighScoreRecordTable(record);
                break;

            case Difficulty.Expert:
                Expert = new HighScoreRecordTable(record);
                break;

            case Difficulty.Master:
                Master = new HighScoreRecordTable(record);
                break;
            }
        }
        private IHighScoreRecordTable <IHighScoreRecordTableUnit> Read(IXLWorksheet source)
        {
            var highScoreRecordTable = new HighScoreRecordTable();

            var header = new Header().GetColumnsMappedByParameter();
            var rows   = source.Rows().Skip(1);

            foreach (var row in rows)
            {
                highScoreRecordTable.Add(CreateHighScoreRecord(header, row));
            }

            return(highScoreRecordTable);
        }