コード例 #1
0
        private async Task OnCheckForUpdatesExecute()
        {
            AvailableUpdates.Clear();

            var packages = await TaskHelper.Run(() => _packagesUpdatesSearcherService.SearchForUpdates(AllowPrerelease, false), true);

            // TODO: AddRange doesn't refresh button state. need to fix later
            AvailableUpdates = new ObservableCollection <IPackageDetails>(packages);
        }
コード例 #2
0
        private async Task OnCheckForUpdatesExecute()
        {
            if (AvailableUpdates == null)
            {
                return;
            }

            AvailableUpdates.Clear();
            using (_pleaseWaitService.WaitingScope())
            {
                var packages = await TaskHelper.Run(() => _packagesUpdatesSearcherService.SearchForUpdates(), true);

                // TODO: AddRange doesn't refresh button state. need to fix later
                AvailableUpdates = new ObservableCollection <IPackageDetails>(packages);
            }
            await OnOpenUpdateWindowExecuteAsync();
        }