13 references to PreferLengthCountIsEmptyOverAnyAnalyzer
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Performance\CSharpPreferLengthCountIsEmptyOverAny.Fixer.cs (1)
38
IdentifierName(
PreferLengthCountIsEmptyOverAnyAnalyzer
.IsEmptyText)
Microsoft.CodeAnalysis.NetAnalyzers (11)
Microsoft.NetCore.Analyzers\Performance\PreferLengthCountIsEmptyOverAny.Fixer.cs (11)
18
public override ImmutableArray<string> FixableDiagnosticIds { get; } = ImmutableArray.Create(
PreferLengthCountIsEmptyOverAnyAnalyzer
.RuleId);
72
switch (diagnostic.Properties[
PreferLengthCountIsEmptyOverAnyAnalyzer
.DiagnosticPropertyKey])
74
case
PreferLengthCountIsEmptyOverAnyAnalyzer
.IsEmptyText:
78
case
PreferLengthCountIsEmptyOverAnyAnalyzer
.LengthText:
79
editor.ReplaceNode(toReplace, (currentNode, _) => ReplaceAnyWithPropertyCheck(currentNode,
PreferLengthCountIsEmptyOverAnyAnalyzer
.LengthText) ?? currentNode);
82
case
PreferLengthCountIsEmptyOverAnyAnalyzer
.CountText:
83
editor.ReplaceNode(toReplace, (currentNode, _) => ReplaceAnyWithPropertyCheck(currentNode,
PreferLengthCountIsEmptyOverAnyAnalyzer
.CountText) ?? currentNode);
92
=> diagnostic.Properties[
PreferLengthCountIsEmptyOverAnyAnalyzer
.DiagnosticPropertyKey] switch
94
PreferLengthCountIsEmptyOverAnyAnalyzer
.IsEmptyText => MicrosoftNetCoreAnalyzersResources.PreferIsEmptyOverAnyCodeFixTitle,
95
PreferLengthCountIsEmptyOverAnyAnalyzer
.LengthText => MicrosoftNetCoreAnalyzersResources.PreferLengthOverAnyCodeFixTitle,
96
PreferLengthCountIsEmptyOverAnyAnalyzer
.CountText => MicrosoftNetCoreAnalyzersResources.PreferCountOverAnyCodeFixTitle,
Microsoft.CodeAnalysis.VisualBasic.NetAnalyzers (1)
Microsoft.NetCore.Analyzers\Performance\BasicPreferLengthCountIsEmptyOverAnyFixer.vb (1)
50
SyntaxFactory.IdentifierName(
PreferLengthCountIsEmptyOverAnyAnalyzer
.IsEmptyText)