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:
committed by
Gustas Kažukauskas
parent
3de6a5fd5a
commit
36660b89e9
@@ -16,16 +16,7 @@ using System.IO;
|
||||
namespace OpenRA.Mods.Cnc.FileFormats
|
||||
{
|
||||
public enum NormalType : byte { TiberianSun = 2, RedAlert2 = 4 }
|
||||
public readonly struct VxlElement
|
||||
{
|
||||
public readonly byte Color;
|
||||
public readonly byte Normal;
|
||||
public VxlElement(byte color, byte normal)
|
||||
{
|
||||
Color = color;
|
||||
Normal = normal;
|
||||
}
|
||||
}
|
||||
public readonly record struct VxlElement(byte Color, byte Normal);
|
||||
|
||||
public class VxlLimb
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user