Convert `typeof` to `nameof`

pull/1688/head
Bogdan 2 years ago
parent 7a0dd0bc0d
commit d8c7361205

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

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

Loading…
Cancel
Save