Use CSharpier

This commit is contained in:
Tyrrrz
2023-08-22 21:20:04 +03:00
parent a4726fcefd
commit 21b601da66
99 changed files with 975 additions and 1163 deletions

View File

@@ -13,15 +13,15 @@ public class ParameterMustBeSingleIfNonScalarAnalyzer : AnalyzerBase
public ParameterMustBeSingleIfNonScalarAnalyzer()
: base(
"Parameters of non-scalar types are limited to one per command",
"This parameter has a non-scalar type so it must be the only such parameter in the command. " +
"Property bound to another non-scalar parameter: `{0}`.")
{
}
"This parameter has a non-scalar type so it must be the only such parameter in the command. "
+ "Property bound to another non-scalar parameter: `{0}`."
) { }
private void Analyze(
SyntaxNodeAnalysisContext context,
PropertyDeclarationSyntax propertyDeclaration,
IPropertySymbol property)
IPropertySymbol property
)
{
if (property.ContainingType is null)
return;
@@ -33,8 +33,7 @@ public class ParameterMustBeSingleIfNonScalarAnalyzer : AnalyzerBase
if (parameter.IsScalar())
return;
var otherProperties = property
.ContainingType
var otherProperties = property.ContainingType
.GetMembers()
.OfType<IPropertySymbol>()
.Where(m => !m.Equals(property))
@@ -63,4 +62,4 @@ public class ParameterMustBeSingleIfNonScalarAnalyzer : AnalyzerBase
base.Initialize(context);
context.HandlePropertyDeclaration(Analyze);
}
}
}