#pragma warning disable CS1591 using System; using System.Collections.Generic; using System.Linq; using Jellyfin.Extensions; namespace MediaBrowser.Controller.Sorting { public static class SortExtensions { private static readonly AlphanumericComparator _comparer = new AlphanumericComparator(); public static IEnumerable OrderByString(this IEnumerable list, Func getName) { return list.OrderBy(getName, _comparer); } public static IEnumerable OrderByStringDescending(this IEnumerable list, Func getName) { return list.OrderByDescending(getName, _comparer); } public static IOrderedEnumerable ThenByString(this IOrderedEnumerable list, Func getName) { return list.ThenBy(getName, _comparer); } public static IOrderedEnumerable ThenByStringDescending(this IOrderedEnumerable list, Func getName) { return list.ThenByDescending(getName, _comparer); } } }