Convert typeof to nameof

This commit is contained in:
Bogdan
2023-05-24 19:25:08 +03:00
parent 7a0dd0bc0d
commit d8c7361205
2 changed files with 2 additions and 2 deletions

View File

@@ -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);
}
}
}

View File

@@ -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);