Fix IDE0057

This commit is contained in:
RoosterDragon
2023-04-05 19:12:33 +01:00
committed by Pavel Penev
parent 5254348819
commit 023d80b94d
42 changed files with 104 additions and 104 deletions

View File

@@ -58,7 +58,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
.Select(type => new
{
type.Namespace,
Name = type.Name.EndsWith("Info") ? type.Name.Substring(0, type.Name.Length - 4) : type.Name,
Name = type.Name.EndsWith("Info") ? type.Name[..^4] : type.Name,
Description = string.Join(" ", Utility.GetCustomAttributes<DescAttribute>(type, false).SelectMany(d => d.Lines)),
InheritedTypes = type.BaseTypes()
.Select(y => y.Name)
@@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
.Select(a =>
{
var name = a.AttributeType.Name;
name = name.EndsWith("Attribute") ? name.Substring(0, name.Length - 9) : name;
name = name.EndsWith("Attribute") ? name[..^9] : name;
return new
{