Enable TreatWarningsAsErrors for MediaBrowser.Controller in Release

This commit is contained in:
Bond_009
2020-08-22 21:56:24 +02:00
parent 92c491397e
commit 404bb4f835
209 changed files with 539 additions and 81 deletions

View File

@@ -1,3 +1,5 @@
#pragma warning disable CS1591
#nullable enable
using System;
@@ -127,7 +129,7 @@ namespace MediaBrowser.Controller.Sorting
}
/// <inheritdoc />
public int Compare(string x, string y)
public int Compare(string? x, string? y)
{
return CompareValues(x, y);
}

View File

@@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System;
using System.Collections.Generic;
using System.Linq;
@@ -7,6 +9,7 @@ namespace MediaBrowser.Controller.Sorting
public static class SortExtensions
{
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);