mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-20 07:45:26 +03:00
rework scheduled tasks in preparation of common project going portable
This commit is contained in:
25
MediaBrowser.Controller/Extensions/BaseExtensions.cs
Normal file
25
MediaBrowser.Controller/Extensions/BaseExtensions.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using MediaBrowser.Model.Cryptography;
|
||||
|
||||
namespace MediaBrowser.Controller.Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Class BaseExtensions
|
||||
/// </summary>
|
||||
public static class BaseExtensions
|
||||
{
|
||||
public static ICryptographyProvider CryptographyProvider { get; set; }
|
||||
|
||||
public static string RemoveDiacritics(this string text)
|
||||
{
|
||||
return String.Concat(
|
||||
text.Normalize(NormalizationForm.FormD)
|
||||
.Where(ch => CharUnicodeInfo.GetUnicodeCategory(ch) !=
|
||||
UnicodeCategory.NonSpacingMark)
|
||||
).Normalize(NormalizationForm.FormC);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user