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,35 +16,9 @@ using OpenRA.Mods.Common.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.EditorBrushes
|
||||
{
|
||||
public readonly struct BlitTile
|
||||
{
|
||||
public readonly TerrainTile TerrainTile;
|
||||
public readonly ResourceTile ResourceTile;
|
||||
public readonly ResourceLayerContents? ResourceLayerContents;
|
||||
public readonly byte Height;
|
||||
public readonly record struct BlitTile(TerrainTile TerrainTile, ResourceTile ResourceTile, ResourceLayerContents? ResourceLayerContents, byte Height);
|
||||
|
||||
public BlitTile(TerrainTile terrainTile, ResourceTile resourceTile, ResourceLayerContents? resourceLayerContents, byte height)
|
||||
{
|
||||
TerrainTile = terrainTile;
|
||||
ResourceTile = resourceTile;
|
||||
ResourceLayerContents = resourceLayerContents;
|
||||
Height = height;
|
||||
}
|
||||
}
|
||||
|
||||
public readonly struct EditorBlitSource
|
||||
{
|
||||
public readonly CellRegion CellRegion;
|
||||
public readonly Dictionary<string, EditorActorPreview> Actors;
|
||||
public readonly Dictionary<CPos, BlitTile> Tiles;
|
||||
|
||||
public EditorBlitSource(CellRegion cellRegion, Dictionary<string, EditorActorPreview> actors, Dictionary<CPos, BlitTile> tiles)
|
||||
{
|
||||
CellRegion = cellRegion;
|
||||
Actors = actors;
|
||||
Tiles = tiles;
|
||||
}
|
||||
}
|
||||
public readonly record struct EditorBlitSource(CellRegion CellRegion, Dictionary<string, EditorActorPreview> Actors, Dictionary<CPos, BlitTile> Tiles);
|
||||
|
||||
[Flags]
|
||||
public enum MapBlitFilters
|
||||
|
||||
Reference in New Issue
Block a user