< Summary - Jellyfin

Information
Class: MediaBrowser.Controller.Sorting.SortExtensions
Assembly: MediaBrowser.Controller
File(s): /srv/git/jellyfin/MediaBrowser.Controller/Sorting/SortExtensions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 36
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 10/25/2025 - 12:09:58 AM Line coverage: 0% (0/5) Total lines: 341/19/2026 - 12:13:54 AM Line coverage: 0% (0/5) Total lines: 36

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.cctor()100%210%
OrderByString(...)100%210%
OrderByStringDescending(...)100%210%
ThenByString(...)100%210%
ThenByStringDescending(...)100%210%

File(s)

/srv/git/jellyfin/MediaBrowser.Controller/Sorting/SortExtensions.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2
 3using System;
 4using System.Collections;
 5using System.Collections.Generic;
 6using System.Globalization;
 7using System.Linq;
 8using Jellyfin.Extensions;
 9
 10namespace MediaBrowser.Controller.Sorting
 11{
 12    public static class SortExtensions
 13    {
 014        private static readonly StringComparer _comparer = StringComparer.Create(CultureInfo.InvariantCulture, CompareOp
 15
 16        public static IEnumerable<T> OrderByString<T>(this IEnumerable<T> list, Func<T, string> getName)
 17        {
 018            return list.OrderBy(getName, _comparer);
 19        }
 20
 21        public static IEnumerable<T> OrderByStringDescending<T>(this IEnumerable<T> list, Func<T, string> getName)
 22        {
 023            return list.OrderByDescending(getName, _comparer);
 24        }
 25
 26        public static IOrderedEnumerable<T> ThenByString<T>(this IOrderedEnumerable<T> list, Func<T, string> getName)
 27        {
 028            return list.ThenBy(getName, _comparer);
 29        }
 30
 31        public static IOrderedEnumerable<T> ThenByStringDescending<T>(this IOrderedEnumerable<T> list, Func<T, string> g
 32        {
 033            return list.ThenByDescending(getName, _comparer);
 34        }
 35    }
 36}