mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 15:33:05 +08:00
Use OrderByDescending
This commit is contained in:
parent
23ab6f8f94
commit
62ba214dad
@ -69,8 +69,8 @@ namespace osu.Game.Rulesets
|
|||||||
// Given name is always going to be equally-or-more qualified than the assembly name.
|
// Given name is always going to be equally-or-more qualified than the assembly name.
|
||||||
.Where(a => args.Name.Contains(a.GetName().Name, StringComparison.Ordinal))
|
.Where(a => args.Name.Contains(a.GetName().Name, StringComparison.Ordinal))
|
||||||
// Pick the greatest assembly version.
|
// Pick the greatest assembly version.
|
||||||
.OrderBy(a => a.GetName().Version)
|
.OrderByDescending(a => a.GetName().Version)
|
||||||
.LastOrDefault();
|
.FirstOrDefault();
|
||||||
|
|
||||||
if (domainAssembly != null)
|
if (domainAssembly != null)
|
||||||
return domainAssembly;
|
return domainAssembly;
|
||||||
|
Loading…
Reference in New Issue
Block a user