diff options
Diffstat (limited to 'Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions')
| -rw-r--r-- | Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/CharExtensions.cs | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/CharExtensions.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/CharExtensions.cs index 59076bd66..cd77a30eb 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/CharExtensions.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/CharExtensions.cs @@ -333,7 +333,7 @@ namespace NLangDetect.Core.Extensions if (!IsValidCodePoint(codePoint)) { - throw new ArgumentException("Argument is not a valid code point.", "ch"); + throw new ArgumentException("Argument is not a valid code point.", nameof(ch)); } int top, bottom, current; diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs index fc6c58a95..c60757c02 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/StringExtensions.cs @@ -14,10 +14,10 @@ namespace NLangDetect.Core.Extensions /// <exception cref="IndexOutOfRangeException"> if start or end are negative, if end is greater than length(), or if start is greater than end</exception> public static string SubSequence(this string s, int start, int end) { - if (start < 0) throw new ArgumentOutOfRangeException("start", "Argument must not be negative."); - if (end < 0) throw new ArgumentOutOfRangeException("end", "Argument must not be negative."); - if (end > s.Length) throw new ArgumentOutOfRangeException("end", "Argument must not be greater than the input string's length."); - if (start > end) throw new ArgumentOutOfRangeException("start", "Argument must not be greater than the 'end' argument."); + if (start < 0) throw new ArgumentOutOfRangeException(nameof(start), "Argument must not be negative."); + if (end < 0) throw new ArgumentOutOfRangeException(nameof(end), "Argument must not be negative."); + if (end > s.Length) throw new ArgumentOutOfRangeException(nameof(end), "Argument must not be greater than the input string's length."); + if (start > end) throw new ArgumentOutOfRangeException(nameof(start), "Argument must not be greater than the 'end' argument."); return s.Substring(start, end - start); } |
