Esempio n. 1
0
        private async Task PrepareSearch()
        {
            await PrepareDirectories();

            if (Searches == null || !Searches.Any())
            {
                SelectedSearches = Enumerable.Empty <NewMediaViewModel>();
            }
            else
            {
                var selectedList = Searches.Where(s => s.IsSelected).ToList();
                var t            = Task.WhenAll(selectedList.RunTasks(s => s.InitSearch(), _exceptionHandler));
                SelectedSearches = selectedList;
                await t;
            }
        }