Merge pull request #4189 from Bond-009/minor5

Minor improvements
This commit is contained in:
Anthony Lavado
2020-09-23 09:58:19 -04:00
committed by GitHub
7 changed files with 46 additions and 22 deletions

View File

@@ -1,3 +1,4 @@
#nullable enable
#pragma warning disable CS1591
using System;
@@ -15,11 +16,6 @@ namespace MediaBrowser.Controller.Extensions
{
public static string RemoveDiacritics(this string text)
{
if (text == null)
{
throw new ArgumentNullException(nameof(text));
}
var chars = Normalize(text, NormalizationForm.FormD)
.Where(ch => CharUnicodeInfo.GetUnicodeCategory(ch) != UnicodeCategory.NonSpacingMark);

View File

@@ -1,3 +1,4 @@
#nullable enable
#pragma warning disable CS1591
using System;
@@ -9,7 +10,7 @@ namespace MediaBrowser.Controller.Library
{
public static class NameExtensions
{
private static string RemoveDiacritics(string name)
private static string RemoveDiacritics(string? name)
{
if (name == null)
{