Channel9Downloader.ViewModels.Categories.CategoriesVM.UpdateCategoriesAsync C# (CSharp) Method

UpdateCategoriesAsync() private method

Updates the available categories asynchronously.
private UpdateCategoriesAsync ( TaskScheduler continuationTaskScheduler ) : void
continuationTaskScheduler System.Threading.Tasks.TaskScheduler The task scheduler that should be used for the continuation. /// This should usually be the scheduler of the UI thread.
return void
        private void UpdateCategoriesAsync(TaskScheduler continuationTaskScheduler)
        {
            IsAdornerVisible = true;
            var task = new Task(() => _categoryRepository.UpdateCategories());
            task.ContinueWith(x => InitializeCategoriesAsync(continuationTaskScheduler));
            task.Start();
        }