Replace == null with is null

This commit is contained in:
Bond_009
2022-12-05 15:00:20 +01:00
parent b2def4c9ea
commit c7d50d640e
206 changed files with 627 additions and 627 deletions

View File

@@ -121,7 +121,7 @@ namespace Emby.Server.Implementations.Collections
{
var folder = GetCollectionsFolder(false).GetAwaiter().GetResult();
return folder == null
return folder is null
? Enumerable.Empty<BoxSet>()
: folder.GetChildren(user, true).OfType<BoxSet>();
}
@@ -138,7 +138,7 @@ namespace Emby.Server.Implementations.Collections
var parentFolder = await GetCollectionsFolder(true).ConfigureAwait(false);
if (parentFolder == null)
if (parentFolder is null)
{
throw new ArgumentException(nameof(parentFolder));
}
@@ -216,7 +216,7 @@ namespace Emby.Server.Implementations.Collections
{
var item = _libraryManager.GetItemById(id);
if (item == null)
if (item is null)
{
throw new ArgumentException("No item exists with the supplied Id");
}
@@ -267,7 +267,7 @@ namespace Emby.Server.Implementations.Collections
var child = collection.LinkedChildren.FirstOrDefault(i => (i.ItemId.HasValue && i.ItemId.Value.Equals(guidId)) || (childItem != null && string.Equals(childItem.Path, i.Path, StringComparison.OrdinalIgnoreCase)));
if (child == null)
if (child is null)
{
_logger.LogWarning("No collection title exists with the supplied Id");
continue;