diff options
| author | Bond_009 <bond.009@outlook.com> | 2022-12-05 15:00:20 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2022-12-05 15:00:20 +0100 |
| commit | c7d50d640e614a3c13699e3041fbfcb258861c5a (patch) | |
| tree | 85ce1a16c1af479160b805ec098463ae457b5228 /Emby.Server.Implementations/Updates/InstallationManager.cs | |
| parent | b2def4c9ea6cf5e406bf5f865867d6cb5b54f640 (diff) | |
Replace == null with is null
Diffstat (limited to 'Emby.Server.Implementations/Updates/InstallationManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Updates/InstallationManager.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index 550f0e075..84489b646 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -102,7 +102,7 @@ namespace Emby.Server.Implementations.Updates PackageInfo[]? packages = await _httpClientFactory.CreateClient(NamedClient.Default) .GetFromJsonAsync<PackageInfo[]>(new Uri(manifest), _jsonSerializerOptions, cancellationToken).ConfigureAwait(false); - if (packages == null) + if (packages is null) { return Array.Empty<PackageInfo>(); } @@ -251,7 +251,7 @@ namespace Emby.Server.Implementations.Updates var package = FilterPackages(availablePackages, name, id, specificVersion).FirstOrDefault(); // Package not found in repository - if (package == null) + if (package is null) { yield break; } @@ -370,7 +370,7 @@ namespace Emby.Server.Implementations.Updates /// <param name="plugin">The <see cref="LocalPlugin"/> to uninstall.</param> public void UninstallPlugin(LocalPlugin plugin) { - if (plugin == null) + if (plugin is null) { return; } @@ -565,7 +565,7 @@ namespace Emby.Server.Implementations.Updates ?? _pluginManager.Plugins.FirstOrDefault(p => p.Name.Equals(package.Name, StringComparison.OrdinalIgnoreCase) && p.Version.Equals(package.Version)); await PerformPackageInstallation(package, plugin?.Manifest.Status ?? PluginStatus.Active, cancellationToken).ConfigureAwait(false); - _logger.LogInformation("Plugin {Action}: {PluginName} {PluginVersion}", plugin == null ? "installed" : "updated", package.Name, package.Version); + _logger.LogInformation("Plugin {Action}: {PluginName} {PluginVersion}", plugin is null ? "installed" : "updated", package.Name, package.Version); return plugin != null; } |
