예제 #1
0
        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();
        }
예제 #2
0
        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();
        }