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
@@ -190,24 +190,15 @@ namespace OpenRA.Mods.Common.Orders
|
||||
return order;
|
||||
}
|
||||
|
||||
protected sealed class UnitOrderResult
|
||||
protected sealed class UnitOrderResult(Actor actor, IOrderTargeter order, IIssueOrder trait, string cursor, in Target target)
|
||||
{
|
||||
public readonly Actor Actor;
|
||||
public readonly IOrderTargeter Order;
|
||||
public readonly IIssueOrder Trait;
|
||||
public readonly string Cursor;
|
||||
public readonly Actor Actor = actor;
|
||||
public readonly IOrderTargeter Order = order;
|
||||
public readonly IIssueOrder Trait = trait;
|
||||
public readonly string Cursor = cursor;
|
||||
public ref readonly Target Target => ref target;
|
||||
|
||||
readonly Target target;
|
||||
|
||||
public UnitOrderResult(Actor actor, IOrderTargeter order, IIssueOrder trait, string cursor, in Target target)
|
||||
{
|
||||
Actor = actor;
|
||||
Order = order;
|
||||
Trait = trait;
|
||||
Cursor = cursor;
|
||||
this.target = target;
|
||||
}
|
||||
readonly Target target = target;
|
||||
}
|
||||
|
||||
public virtual bool ClearSelectionOnLeftClick => true;
|
||||
|
||||
Reference in New Issue
Block a user