Fix CA1310, CA1311

This commit is contained in:
RoosterDragon
2023-03-12 15:44:49 +00:00
committed by Matthias Mailänder
parent d83e579dfe
commit 285443f10f
43 changed files with 80 additions and 67 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(new[] { '.' }, StringSplitOptions.RemoveEmptyEntries).LastOrDefault())
.Select(s => s.EndsWith("Info") ? s.Remove(s.Length - 4, 4) : s)
.Select(s => s.EndsWith("Info", StringComparison.Ordinal) ? s.Remove(s.Length - 4, 4) : s)
.ToArray();
}
}