Fix IDE0028, IDE0300, IDE0301, IDE0302, IDE0303, IDE0304.

Silence IDE0305.
This commit is contained in:
RoosterDragon
2025-03-03 17:29:45 +00:00
committed by Pavel Penev
parent 0740991c12
commit 79454d8fd2
559 changed files with 1661 additions and 1751 deletions

View File

@@ -80,7 +80,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
if (extractionCandidates.Count > 0)
{
var chromeFilename = chrome.Split('/').Last();
groupedCandidates[new HashSet<string>() { chromeFilename }] = new List<ExtractionCandidate>();
groupedCandidates[[chromeFilename]] = [];
for (var i = 0; i < extractionCandidates.Count; i++)
{
var candidate = extractionCandidates[i];
@@ -126,7 +126,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
if (nHash.Key != null)
groupedCandidates[nHash.Key].Add(candidate);
else
groupedCandidates[newHash] = new List<ExtractionCandidate>() { candidate };
groupedCandidates[newHash] = [candidate];
}
var startWithNewline = File.Exists(fluentPath);
@@ -214,7 +214,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
Key = key;
Type = type;
Value = value;
Nodes = new List<MiniYamlNodeBuilder>() { node };
Nodes = [node];
}
}
@@ -300,7 +300,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
if (!string.IsNullOrEmpty(nodeId))
{
nodeId = string.Join('-', nodeId.Split('_')
.Except(string.IsNullOrEmpty(container) ? new string[] { widgetType } : container.Split('_').Append(widgetType))
.Except(string.IsNullOrEmpty(container) ? [widgetType] : container.Split('_').Append(widgetType))
.Where(s => !string.IsNullOrEmpty(s)));
if (!string.IsNullOrEmpty(nodeId))