9 references to CA1857
Microsoft.CodeAnalysis.NetAnalyzers (9)
Microsoft.NetCore.Analyzers\Performance\ConstantExpectedAnalyzer.cs (9)
75
internal const string Id = nameof(
CA1857
);
121
CA1857
.ConstantOutOfBoundsRule,
CA1857
.ConstantInvalidConstantRule,
122
CA1857
.ConstantNotConstantRule,
CA1857
.AttributeExpectedRule);
250
var diagnostic = parameter.DeclaringSyntaxReferences[0].GetSyntax().CreateDiagnostic(
CA1857
.AttributeExpectedRule);
480
validationDiagnostics = argument.CreateDiagnostic(
CA1857
.ConstantNotConstantRule);
489
protected Diagnostic CreateConstantInvalidConstantRuleDiagnostic(IArgumentOperation argument) => argument.CreateDiagnostic(
CA1857
.ConstantInvalidConstantRule, Parameter.Type.ToDisplayString());
490
protected static Diagnostic CreateConstantOutOfBoundsRuleDiagnostic(IArgumentOperation argument, string minText, string maxText) => argument.CreateDiagnostic(
CA1857
.ConstantOutOfBoundsRule, minText, maxText);