void _installationManager_PackageInstallationFailed(object sender, InstallationFailedEventArgs e)
 {
     Dispatcher.InvokeAsync(UpdateInProgressInstallations);
 }
Example #2
0
        async void _installationManager_PackageInstallationFailed(object sender, InstallationFailedEventArgs e)
        {
            var installationInfo = e.InstallationInfo;

            var type = NotificationType.InstallationFailed.ToString();

            var notification = new NotificationRequest
            {
                Level = NotificationLevel.Error,
                Description = e.Exception.Message,
                NotificationType = type
            };

            notification.Variables["Name"] = installationInfo.Name;
            notification.Variables["Version"] = installationInfo.Version;

            await SendNotification(notification).ConfigureAwait(false);
        }
Example #3
0
        async void _installationManager_PackageInstallationFailed(object sender, InstallationFailedEventArgs e)
        {
            var installationInfo = e.InstallationInfo;

            foreach (var user in _userManager
                .Users
                .Where(i => i.Configuration.IsAdministrator)
                .ToList())
            {
                var notification = new Notification
                {
                    UserId = user.Id,
                    Category = "PackageInstallationFailed",
                    Level = NotificationLevel.Error,
                    Name = installationInfo.Name + " " + installationInfo.Version + " installation failed",
                    RelatedId = installationInfo.Name,
                    Description = e.Exception.Message
                };

                try
                {
                    await _notificationsRepo.AddNotification(notification, CancellationToken.None).ConfigureAwait(false);
                }
                catch (Exception ex)
                {
                    _logger.ErrorException("Error adding notification", ex);
                }
            }
        }
 void _installationManager_PackageInstallationFailed(object sender, InstallationFailedEventArgs e)
 {
     _serverManager.SendWebSocketMessage("PackageInstallationFailed", e.InstallationInfo);
 }