Blacker.MangaScraper.ViewModel.MainWindowViewModel.PreloadMangas C# (CSharp) Метод

PreloadMangas() приватный Метод

private PreloadMangas ( ) : void
Результат void
        private void PreloadMangas()
        {
            var preloadables = _scrapers.OfType<IPreload>();

            // if there are no preloadables skip the execution
            if (!preloadables.Any())
                return;

            if (!OperationInProgress)
            {
                CurrentActionText = "Preloading manga directories ...";
                OperationInProgress = true;
            }

            AsyncWrapper.Call<object>(() =>
                                {
                                    System.Threading.Tasks.Parallel.ForEach(preloadables, (x) => x.PreloadDirectory());
                                    return null;
                                },
                                (x, y) =>
                                {
                                    // don't care about errors...
                                    OperationInProgress = false;
                                    CurrentActionText = "";
                                }
                        );
        }