From d8c73612051e8e8f8afab5c96ed872148882b433 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 24 May 2023 19:25:08 +0300 Subject: [PATCH] Convert `typeof` to `nameof` --- src/NzbDrone.Integration.Test/ApiTests/IndexerFixture.cs | 2 +- src/Prowlarr.Api.V1/Commands/CommandController.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Integration.Test/ApiTests/IndexerFixture.cs b/src/NzbDrone.Integration.Test/ApiTests/IndexerFixture.cs index 470d02c96..e7e739e1b 100644 --- a/src/NzbDrone.Integration.Test/ApiTests/IndexerFixture.cs +++ b/src/NzbDrone.Integration.Test/ApiTests/IndexerFixture.cs @@ -16,7 +16,7 @@ namespace NzbDrone.Integration.Test.ApiTests indexers.Should().NotBeEmpty(); indexers.Should().NotContain(c => string.IsNullOrWhiteSpace(c.Name)); - indexers.Where(c => c.ConfigContract == typeof(NullConfig).Name).Should().OnlyContain(c => c.Enable); + indexers.Where(c => c.ConfigContract == nameof(NullConfig)).Should().OnlyContain(c => c.Enable); } } } diff --git a/src/Prowlarr.Api.V1/Commands/CommandController.cs b/src/Prowlarr.Api.V1/Commands/CommandController.cs index 6859c94cc..076121f5a 100644 --- a/src/Prowlarr.Api.V1/Commands/CommandController.cs +++ b/src/Prowlarr.Api.V1/Commands/CommandController.cs @@ -112,7 +112,7 @@ namespace Prowlarr.Api.V1.Commands { BroadcastResourceChange(ModelAction.Updated, pendingUpdate); - if (pendingUpdate.Name == typeof(MessagingCleanupCommand).Name.Replace("Command", "") && + if (pendingUpdate.Name == nameof(MessagingCleanupCommand).Replace("Command", "") && pendingUpdate.Status == CommandStatus.Completed) { BroadcastResourceChange(ModelAction.Sync);