Silence IDE0290.

This rule recommends use of primary constructors. Apply the suggestions on simple POCOs, adjusting some to readonly/structs/records at the same time. For more complex classes, the use of primary constructors is more distracting than helpful, so silence the rule. IDEs can still offer fixes for using primary constructors, but it will not show up as a build issue.
This commit is contained in:
RoosterDragon
2025-04-01 19:26:19 +01:00
committed by Gustas Kažukauskas
parent 3de6a5fd5a
commit 36660b89e9
52 changed files with 161 additions and 707 deletions

View File

@@ -30,17 +30,7 @@ namespace OpenRA.Support
samples.GetOrAdd(item.Key).Add(new BenchmarkPoint(localTick, item.Value.LastValue));
}
sealed class BenchmarkPoint
{
public int Tick { get; }
public double Value { get; }
public BenchmarkPoint(int tick, double value)
{
Tick = tick;
Value = value;
}
}
readonly record struct BenchmarkPoint(int Tick, double Value);
public void Write()
{

View File

@@ -26,17 +26,7 @@ namespace OpenRA
public TextWriter Writer;
}
readonly struct ChannelData
{
public readonly string Channel;
public readonly string Text;
public ChannelData(string channel, string text)
{
Text = text;
Channel = channel;
}
}
readonly record struct ChannelData(string Channel, string Text);
public static class Log
{