aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Localization/LocalizationManager.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2022-12-07 17:17:37 +0100
committerGitHub <noreply@github.com>2022-12-07 17:17:37 +0100
commit584c80e323ac2a1386d86ff9f59e50daf174418e (patch)
tree4dbb2861cb79cf418a76a4b8f364fdc5c62b56f7 /Emby.Server.Implementations/Localization/LocalizationManager.cs
parentf3c57e6a0ae015dc51cf548a0380d1bed33959c2 (diff)
parent227aa0540bf0d6c00848b0efb8a5e0ece86c7412 (diff)
Merge pull request #8547 from Bond-009/net7
Diffstat (limited to 'Emby.Server.Implementations/Localization/LocalizationManager.cs')
-rw-r--r--Emby.Server.Implementations/Localization/LocalizationManager.cs15
1 files changed, 3 insertions, 12 deletions
diff --git a/Emby.Server.Implementations/Localization/LocalizationManager.cs b/Emby.Server.Implementations/Localization/LocalizationManager.cs
index 8f15a155e..b418c7877 100644
--- a/Emby.Server.Implementations/Localization/LocalizationManager.cs
+++ b/Emby.Server.Implementations/Localization/LocalizationManager.cs
@@ -219,10 +219,7 @@ namespace Emby.Server.Implementations.Localization
/// <inheritdoc />
public int? GetRatingLevel(string rating)
{
- if (string.IsNullOrEmpty(rating))
- {
- throw new ArgumentNullException(nameof(rating));
- }
+ ArgumentException.ThrowIfNullOrEmpty(rating);
if (_unratedValues.Contains(rating.AsSpan(), StringComparison.OrdinalIgnoreCase))
{
@@ -295,10 +292,7 @@ namespace Emby.Server.Implementations.Localization
private Dictionary<string, string> GetLocalizationDictionary(string culture)
{
- if (string.IsNullOrEmpty(culture))
- {
- throw new ArgumentNullException(nameof(culture));
- }
+ ArgumentException.ThrowIfNullOrEmpty(culture);
const string Prefix = "Core";
@@ -310,10 +304,7 @@ namespace Emby.Server.Implementations.Localization
private async Task<Dictionary<string, string>> GetDictionary(string prefix, string culture, string baseFilename)
{
- if (string.IsNullOrEmpty(culture))
- {
- throw new ArgumentNullException(nameof(culture));
- }
+ ArgumentException.ThrowIfNullOrEmpty(culture);
var dictionary = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);