diff options
| author | Andrew Rabert <6550543+nvllsvm@users.noreply.github.com> | 2019-01-19 15:11:50 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-19 15:11:50 -0500 |
| commit | 55538764fa06a64795c099fc6496df9dbb4156bd (patch) | |
| tree | 8c1f94861ecebdf634b70a7265945b6f8f13aff1 /Emby.Server.Implementations/Localization/LocalizationManager.cs | |
| parent | 3b52035ee064a5d9aa215d9515211d4508585d39 (diff) | |
| parent | c5430f86b0b5863482e7c4f7e55a79c7d88c133b (diff) | |
Merge pull request #575 from EraYaN/reformat
Reformat all C# server code to conform with code standards
Diffstat (limited to 'Emby.Server.Implementations/Localization/LocalizationManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Localization/LocalizationManager.cs | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/Emby.Server.Implementations/Localization/LocalizationManager.cs b/Emby.Server.Implementations/Localization/LocalizationManager.cs index a2c47cd79..5d3c39af4 100644 --- a/Emby.Server.Implementations/Localization/LocalizationManager.cs +++ b/Emby.Server.Implementations/Localization/LocalizationManager.cs @@ -1,17 +1,17 @@ -using MediaBrowser.Model.Extensions; -using MediaBrowser.Controller.Configuration; -using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Globalization; -using MediaBrowser.Model.Serialization; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; +using MediaBrowser.Controller.Configuration; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Extensions; +using MediaBrowser.Model.Globalization; using MediaBrowser.Model.IO; -using Microsoft.Extensions.Logging; using MediaBrowser.Model.Reflection; +using MediaBrowser.Model.Serialization; +using Microsoft.Extensions.Logging; namespace Emby.Server.Implementations.Localization { @@ -138,7 +138,7 @@ namespace Emby.Server.Implementations.Localization new ParentalRating("FSK-18", 9) }); - LoadRatings("ru", new [] { + LoadRatings("ru", new[] { new ParentalRating("RU-0+", 1), new ParentalRating("RU-6+", 3), @@ -298,9 +298,7 @@ namespace Emby.Server.Implementations.Localization /// <param name="countryCode">The country code.</param> private Dictionary<string, ParentalRating> GetRatings(string countryCode) { - Dictionary<string, ParentalRating> value; - - _allParentalRatings.TryGetValue(countryCode, out value); + _allParentalRatings.TryGetValue(countryCode, out var value); return value; } @@ -320,9 +318,7 @@ namespace Emby.Server.Implementations.Localization if (parts.Length == 2) { - int value; - - if (int.TryParse(parts[1], NumberStyles.Integer, UsCulture, out value)) + if (int.TryParse(parts[1], NumberStyles.Integer, UsCulture, out var value)) { return new ParentalRating { Name = parts[0], Value = value }; } @@ -364,9 +360,7 @@ namespace Emby.Server.Implementations.Localization var ratingsDictionary = GetParentalRatingsDictionary(); - ParentalRating value; - - if (ratingsDictionary.TryGetValue(rating, out value)) + if (ratingsDictionary.TryGetValue(rating, out ParentalRating value)) { return value.Value; } @@ -427,9 +421,7 @@ namespace Emby.Server.Implementations.Localization var dictionary = GetLocalizationDictionary(culture); - string value; - - if (dictionary.TryGetValue(phrase, out value)) + if (dictionary.TryGetValue(phrase, out var value)) { return value; } |
