예제 #1
0
        /// <summary>
        /// Asynchronously adds <see cref="CharacterModel"/> data from the database to the cache
        /// </summary>
        private void BuildCharacterInfoFromDb()
        {
            List <CharacterModel> allCharactersInDb = CharacterDatabase.GetAllCharacters();

            foreach (CharacterModel character in allCharactersInDb)
            {
                AddPlayer(character.Id, new CharacterInfo(character));
            }

            log.Info($"Stored {characters.Count} characters in Character Cache");
        }