Fix `Order{,Descending}` preventing GitLab CI from building tests

This commit is contained in:
YoshiRulz 2024-12-11 10:12:05 +10:00
parent 2b71ff9a79
commit 56e5105d0d
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 4 additions and 0 deletions

View File

@ -234,6 +234,7 @@ namespace BizHawk.Common.CollectionExtensions
return null;
}
#if !NET7_0_OR_GREATER
/// <remarks>shorthand for <c>this.OrderBy(static e => e)</c>, backported from .NET 7</remarks>
public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source)
where T : IComparable<T>
@ -243,6 +244,7 @@ namespace BizHawk.Common.CollectionExtensions
public static IOrderedEnumerable<T> OrderDescending<T>(this IEnumerable<T> source)
where T : IComparable<T>
=> source.OrderByDescending(ReturnSelf);
#endif
/// <inheritdoc cref="List{T}.RemoveAll"/>
/// <remarks>

View File

@ -1,7 +1,9 @@
using System.Collections.Generic;
using System.Linq;
#if !NET7_0_OR_GREATER
using BizHawk.Common.CollectionExtensions;
#endif
using BizHawk.Common.StringExtensions;
using BizHawk.Emulation.Common;