private static async Task EnsureSettingsAndConfigurationAreBootstrapped() { if (AppSettings == null) { AppSettings = await SettingsViewModel.CreateInstance(); } ExternalResourcesHelper ??= new ExternalResourcesHelper(); await ExternalResourcesHelper.LoadSelectedTheme(); InteractionViewModel ??= new InteractionViewModel(); SidebarPinnedController ??= await SidebarPinnedController.CreateInstance(); LibraryManager ??= new LibraryManager(); DrivesManager ??= new DrivesManager(); NetworkDrivesManager ??= new NetworkDrivesManager(); CloudDrivesManager ??= new CloudDrivesManager(); WSLDistroManager ??= new WSLDistroManager(); // Start off a list of tasks we need to run before we can continue startup _ = Task.Factory.StartNew(async() => { await LibraryManager.EnumerateLibrariesAsync(); await DrivesManager.EnumerateDrivesAsync(); await CloudDrivesManager.EnumerateDrivesAsync(); await NetworkDrivesManager.EnumerateDrivesAsync(); await WSLDistroManager.EnumerateDrivesAsync(); }); }
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(); }
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() { ExternalResourcesHelper.LoadOtherThemesAsync(); // Start off a list of tasks we need to run before we can continue startup _ = Task.Run(async() => { await Task.WhenAll( SidebarPinnedController.InitializeAsync(), DrivesManager.EnumerateDrivesAsync(), CloudDrivesManager.EnumerateDrivesAsync(), LibraryManager.EnumerateLibrariesAsync(), NetworkDrivesManager.EnumerateDrivesAsync(), WSLDistroManager.EnumerateDrivesAsync() ); }); ExternalResourcesHelper.LoadOtherThemesAsync(); }
private static async Task EnsureSettingsAndConfigurationAreBootstrapped() { if (AppSettings == null) { AppSettings = await SettingsViewModel.CreateInstance(); } InteractionViewModel ??= new InteractionViewModel(); SidebarPinnedController ??= await SidebarPinnedController.CreateInstance(); DrivesManager ??= new DrivesManager(); NetworkDrivesManager ??= new NetworkDrivesManager(); CloudDrivesManager ??= new CloudDrivesManager(); // Start off a list of tasks we need to run before we can continue startup _ = Task.Factory.StartNew(async() => { await DrivesManager.EnumerateDrivesAsync(); await CloudDrivesManager.EnumerateDrivesAsync(); await NetworkDrivesManager.EnumerateDrivesAsync(); }); }