/// <summary> /// Called when [plugin installed]. /// </summary> /// <param name="package">The package.</param> private void OnPluginInstalled(PackageVersionInfo package) { _logger.Info("New plugin installed: {0} {1} {2}", package.name, package.version, package.classification); EventHelper.QueueEventIfNotNull(PluginInstalled, this, new GenericEventArgs <PackageVersionInfo> { Argument = package }, _logger); ApplicationHost.NotifyPendingRestart(); }
/// <summary> /// Called when [plugin updated]. /// </summary> /// <param name="plugin">The plugin.</param> /// <param name="newVersion">The new version.</param> private void OnPluginUpdated(IPlugin plugin, PackageVersionInfo newVersion) { _logger.Info("Plugin updated: {0} {1} {2}", newVersion.name, newVersion.version, newVersion.classification); EventHelper.QueueEventIfNotNull(PluginUpdated, this, new GenericEventArgs <Tuple <IPlugin, PackageVersionInfo> > { Argument = new Tuple <IPlugin, PackageVersionInfo>(plugin, newVersion) }, _logger); ApplicationHost.NotifyPendingRestart(); }