Enable Net 7 and Net 8 style rules.

This commit is contained in:
RoosterDragon
2024-11-25 20:15:58 +00:00
committed by Gustas Kažukauskas
parent 71ae0aedfb
commit cfde11556f
31 changed files with 74 additions and 94 deletions

View File

@@ -150,7 +150,7 @@ namespace OpenRA.Scripting
// Remove the namespace and the trailing "Info"
return types.SelectMany(i => i.GetGenericArguments())
.Select(g => g.Name.Split('.', StringSplitOptions.RemoveEmptyEntries).LastOrDefault())
.Select(s => s.EndsWith("Info", StringComparison.Ordinal) ? s.Remove(s.Length - 4, 4) : s)
.Select(s => s.EndsWith("Info", StringComparison.Ordinal) ? s[..^4] : s)
.ToArray();
}
}