Apply code review suggestion

This commit is contained in:
Vasily 2020-03-02 12:34:34 +03:00
parent d1670f8180
commit 376bbb40bd

View File

@ -7,7 +7,7 @@ namespace MediaBrowser.Controller.Sorting
{
public static class SortExtensions
{
private static IComparer<string> _comparer = new AlphanumComparator();
private static readonly AlphanumComparator _comparer = new AlphanumComparator();
public static IEnumerable<T> OrderByString<T>(this IEnumerable<T> list, Func<T, string> getName)
{
return list.OrderBy(getName, _comparer);