Beispiel #1
0
        public async Task OnApplicationStartup(CancellationToken cancellationToken)
        {
            List <Task> TaskList = new List <Task>();

            Task worldsTask = _worldService.RefreshStore();

            TaskList.Add(worldsTask);

            Task factionsTask = _factionService.RefreshStore();

            TaskList.Add(factionsTask);

            // Won't refresh if already populated
            Task itemsTask = _itemService.RefreshStore();

            TaskList.Add(itemsTask);

            Task zoneTask = _zoneService.RefreshStore();

            TaskList.Add(zoneTask);

            // Won't refresh if already populated
            Task titleTask = _titleService.RefreshStore();

            TaskList.Add(titleTask);

            Task profileTask = _profileService.RefreshStore();

            TaskList.Add(profileTask);

            await Task.WhenAll(TaskList);
        }