diff options
| author | Bond-009 <bond.009@outlook.com> | 2023-10-03 11:05:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-03 11:05:10 +0200 |
| commit | 14b06ecbe29f6b9120048ea6d0b993778921a6a6 (patch) | |
| tree | bfbca697dbbeac2a02ca581c25d2affded681653 /Emby.Server.Implementations/Plugins/PluginManager.cs | |
| parent | 1514b5d0523928b83e802d0e77ab074528b432e3 (diff) | |
| parent | ab0790271aac8846430c9689dff647eb4ce55078 (diff) | |
Merge pull request #10261 from barronpm/ihostlifetime
Diffstat (limited to 'Emby.Server.Implementations/Plugins/PluginManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Plugins/PluginManager.cs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/Emby.Server.Implementations/Plugins/PluginManager.cs b/Emby.Server.Implementations/Plugins/PluginManager.cs index 1303012e1..d7189ef0c 100644 --- a/Emby.Server.Implementations/Plugins/PluginManager.cs +++ b/Emby.Server.Implementations/Plugins/PluginManager.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Data; using System.Globalization; using System.IO; using System.Linq; @@ -11,7 +10,6 @@ using System.Text; using System.Text.Json; using System.Threading.Tasks; using Emby.Server.Implementations.Library; -using Jellyfin.Extensions; using Jellyfin.Extensions.Json; using Jellyfin.Extensions.Json.Converters; using MediaBrowser.Common; @@ -30,7 +28,7 @@ namespace Emby.Server.Implementations.Plugins /// <summary> /// Defines the <see cref="PluginManager" />. /// </summary> - public class PluginManager : IPluginManager + public sealed class PluginManager : IPluginManager, IDisposable { private const string MetafileName = "meta.json"; @@ -191,15 +189,6 @@ namespace Emby.Server.Implementations.Plugins } } - /// <inheritdoc /> - public void UnloadAssemblies() - { - foreach (var assemblyLoadContext in _assemblyLoadContexts) - { - assemblyLoadContext.Unload(); - } - } - /// <summary> /// Creates all the plugin instances. /// </summary> @@ -441,6 +430,15 @@ namespace Emby.Server.Implementations.Plugins return SaveManifest(manifest, path); } + /// <inheritdoc /> + public void Dispose() + { + foreach (var assemblyLoadContext in _assemblyLoadContexts) + { + assemblyLoadContext.Unload(); + } + } + /// <summary> /// Reconciles the manifest against any properties that exist locally in a pre-packaged meta.json found at the path. /// If no file is found, no reconciliation occurs. |
