aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Common/Plugins')
-rw-r--r--MediaBrowser.Common/Plugins/BasePluginOfT.cs6
-rw-r--r--MediaBrowser.Common/Plugins/IPluginManager.cs5
-rw-r--r--MediaBrowser.Common/Plugins/LocalPlugin.cs8
3 files changed, 12 insertions, 7 deletions
diff --git a/MediaBrowser.Common/Plugins/BasePluginOfT.cs b/MediaBrowser.Common/Plugins/BasePluginOfT.cs
index 0da5592d38..116e9cef80 100644
--- a/MediaBrowser.Common/Plugins/BasePluginOfT.cs
+++ b/MediaBrowser.Common/Plugins/BasePluginOfT.cs
@@ -47,10 +47,10 @@ namespace MediaBrowser.Common.Plugins
var assemblyFilePath = assembly.Location;
var dataFolderPath = Path.Combine(ApplicationPaths.PluginsPath, Path.GetFileNameWithoutExtension(assemblyFilePath));
- if (Version != null && !Directory.Exists(dataFolderPath))
+ if (Version is not null && !Directory.Exists(dataFolderPath))
{
// Try again with the version number appended to the folder name.
- dataFolderPath += "_" + Version.ToString();
+ dataFolderPath += "_" + Version;
}
SetAttributes(assemblyFilePath, dataFolderPath, assemblyName.Version);
@@ -103,7 +103,7 @@ namespace MediaBrowser.Common.Plugins
get
{
// Lazy load
- if (_configuration == null)
+ if (_configuration is null)
{
lock (_configurationSyncLock)
{
diff --git a/MediaBrowser.Common/Plugins/IPluginManager.cs b/MediaBrowser.Common/Plugins/IPluginManager.cs
index 176bcbbd54..fa92d383a2 100644
--- a/MediaBrowser.Common/Plugins/IPluginManager.cs
+++ b/MediaBrowser.Common/Plugins/IPluginManager.cs
@@ -30,6 +30,11 @@ namespace MediaBrowser.Common.Plugins
IEnumerable<Assembly> LoadAssemblies();
/// <summary>
+ /// Unloads all of the assemblies.
+ /// </summary>
+ void UnloadAssemblies();
+
+ /// <summary>
/// Registers the plugin's services with the DI.
/// Note: DI is not yet instantiated yet.
/// </summary>
diff --git a/MediaBrowser.Common/Plugins/LocalPlugin.cs b/MediaBrowser.Common/Plugins/LocalPlugin.cs
index 4c8e2d5044..96af423cc3 100644
--- a/MediaBrowser.Common/Plugins/LocalPlugin.cs
+++ b/MediaBrowser.Common/Plugins/LocalPlugin.cs
@@ -43,7 +43,7 @@ namespace MediaBrowser.Common.Plugins
{
get
{
- if (_version == null)
+ if (_version is null)
{
_version = Version.Parse(Manifest.Version);
}
@@ -85,9 +85,9 @@ namespace MediaBrowser.Common.Plugins
/// <returns>Comparison result.</returns>
public static int Compare(LocalPlugin a, LocalPlugin b)
{
- if (a == null || b == null)
+ if (a is null || b is null)
{
- throw new ArgumentNullException(a == null ? nameof(a) : nameof(b));
+ throw new ArgumentNullException(a is null ? nameof(a) : nameof(b));
}
var compare = string.Compare(a.Name, b.Name, StringComparison.OrdinalIgnoreCase);
@@ -128,7 +128,7 @@ namespace MediaBrowser.Common.Plugins
/// <inheritdoc />
public bool Equals(LocalPlugin? other)
{
- if (other == null)
+ if (other is null)
{
return false;
}