Migrate ServerEventNotifier.OnPackageInstalling to IEventConsumer

This commit is contained in:
Patrick Barron
2020-08-15 18:57:46 -04:00
parent 8c9cd5f6d7
commit b7ceb40d6e
3 changed files with 50 additions and 7 deletions

View File

@@ -38,7 +38,6 @@ namespace Emby.Server.Implementations.EntryPoints
public Task RunAsync()
{
_installationManager.PluginUninstalled += OnPluginUninstalled;
_installationManager.PackageInstalling += OnPackageInstalling;
_installationManager.PackageInstallationCancelled += OnPackageInstallationCancelled;
_installationManager.PackageInstallationCompleted += OnPackageInstallationCompleted;
_installationManager.PackageInstallationFailed += OnPackageInstallationFailed;
@@ -46,11 +45,6 @@ namespace Emby.Server.Implementations.EntryPoints
return Task.CompletedTask;
}
private async void OnPackageInstalling(object sender, InstallationInfo e)
{
await SendMessageToAdminSessions("PackageInstalling", e).ConfigureAwait(false);
}
private async void OnPackageInstallationCancelled(object sender, InstallationInfo e)
{
await SendMessageToAdminSessions("PackageInstallationCancelled", e).ConfigureAwait(false);
@@ -103,7 +97,6 @@ namespace Emby.Server.Implementations.EntryPoints
if (dispose)
{
_installationManager.PluginUninstalled -= OnPluginUninstalled;
_installationManager.PackageInstalling -= OnPackageInstalling;
_installationManager.PackageInstallationCancelled -= OnPackageInstallationCancelled;
_installationManager.PackageInstallationCompleted -= OnPackageInstallationCompleted;
_installationManager.PackageInstallationFailed -= OnPackageInstallationFailed;