private static async Task InitializeAppComponentsAsync() { var userSettingsService = Ioc.Default.GetRequiredService <IUserSettingsService>(); // Start off a list of tasks we need to run before we can continue startup await Task.Run(async() => { await Task.WhenAll( StartAppCenter(), DrivesManager.EnumerateDrivesAsync(), CloudDrivesManager.EnumerateDrivesAsync(), LibraryManager.EnumerateLibrariesAsync(), NetworkDrivesManager.EnumerateDrivesAsync(), WSLDistroManager.EnumerateDrivesAsync(), FileTagsManager.EnumerateFileTagsAsync(), SidebarPinnedController.InitializeAsync() ); await Task.WhenAll( AppSettings.DetectQuickLook(), TerminalController.InitializeAsync(), JumpList.InitializeAsync(), ExternalResourcesHelper.LoadOtherThemesAsync(), ContextFlyoutItemHelper.CachedNewContextMenuEntries ); userSettingsService.ReportToAppCenter(); }); // Check for required updates var updateService = Ioc.Default.GetRequiredService <IUpdateService>(); await updateService.CheckForUpdates(); await updateService.DownloadMandatoryUpdates(); }
public static async Task LoadOtherStuffAsync() { // Start off a list of tasks we need to run before we can continue startup await StartAppCenter(); await Task.Run(async() => { await Task.WhenAll( DrivesManager.EnumerateDrivesAsync(), CloudDrivesManager.EnumerateDrivesAsync(), LibraryManager.EnumerateLibrariesAsync(), NetworkDrivesManager.EnumerateDrivesAsync(), WSLDistroManager.EnumerateDrivesAsync(), SidebarPinnedController.InitializeAsync() ); await Task.WhenAll( AppSettings.DetectQuickLook(), TerminalController.InitializeAsync(), JumpList.InitializeAsync(), ExternalResourcesHelper.LoadOtherThemesAsync(), ContextFlyoutItemHelper.CachedNewContextMenuEntries ); }); // Check for required updates new AppUpdater().CheckForUpdatesAsync(); }