public IEnumerable <string> UpdateAllPackages(bool inDetails) { Exception exception = null; IEnumerable <string> result; try { result = this.PackageManager.UpdateAllPackages(); } catch (Exception ex) { exception = ex; throw; } finally { // Log the result of the update var telemetry = WebMatrixTelemetryServiceProvider.GetTelemetryService(); if (telemetry != null) { string appId = _webMatrixHost.WebSite.ApplicationIdentifier; //telemetry.LogPackageUpdate(_galleryId, package.Id, appId, exception, inDetails, isFeatured: false, isCustomFeed: !FeedSource.IsBuiltIn); } } if (_webMatrixHost != null) { var message = string.Format(Resources.Notification_UpdatedAll); _webMatrixHost.ShowNotification(message); } return(result); }
private void ExecuteToggleEnableAction() { Debug.Assert(SelectedPackage != null, "Must have a selected package."); var packageViewModel = (PackageViewModel)SelectedPackage; Debug.Assert( packageViewModel.SupportsEnableDisable, "This should not be called if a package can't be enabled/disabled"); packageViewModel.IsEnabled = !packageViewModel.IsEnabled; OnPropertyChanged("ToggleEnableActionLabel"); // refresh the UI since the set of disabled packages changed this.BeginUpdateModel(this.SelectedFeedSource, _includePrerelease); // Log the result of the enable toggle var telemetry = WebMatrixTelemetryServiceProvider.GetTelemetryService(); if (telemetry != null) { string appId = this.Host.WebSite.ApplicationIdentifier; if (packageViewModel.IsEnabled) { telemetry.LogPackageEnabled(this.Descriptor.GalleryId, packageViewModel.Id, appId, null, IsDetailsPaneVisible, false, !SelectedFeedSource.IsBuiltIn); } else { telemetry.LogPackageDisabled(this.Descriptor.GalleryId, packageViewModel.Id, appId, null, IsDetailsPaneVisible, false, !SelectedFeedSource.IsBuiltIn); } } }
public IEnumerable <string> InstallPackage(IPackage package, bool inDetails) { Exception exception = null; IEnumerable <string> result = null; try { result = this.PackageManager.InstallPackage(package); } catch (Exception ex) { exception = ex; throw; } finally { // Log the result of the install var telemetry = WebMatrixTelemetryServiceProvider.GetTelemetryService(); if (telemetry != null) { string appId = _webMatrixHost.WebSite.ApplicationIdentifier; telemetry.LogPackageInstall(_galleryId, package.Id, appId, exception, inDetails, isFeatured: false, isCustomFeed: !FeedSource.IsBuiltIn); } } if (_webMatrixHost != null) { string message = string.Format(Resources.Notification_Installed, _packageKind, package.Id); ShowMessageAndReadme(package, message); } return(result); }