2 instantiations of Fix
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (2)
Microsoft.NetCore.Analyzers\Runtime\CSharpAvoidRedundantRegexIsMatchBeforeMatch.Fixer.cs (2)
645
=>
new
(ifStatement, matchDeclarationStatement.Declaration.Variables[0].Initializer!.Value, variableName, matchDeclarationStatement, preDeclaration: null);
648
=>
new
(ifStatement, ((AssignmentExpressionSyntax)assignmentStatement.Expression).Right, variableName, assignmentStatement, preDeclaration);
8 references to Fix
Microsoft.CodeAnalysis.CSharp.NetAnalyzers (8)
Microsoft.NetCore.Analyzers\Runtime\CSharpAvoidRedundantRegexIsMatchBeforeMatch.Fixer.cs (8)
65
if (!TryGetFix(editor.OriginalRoot, model, diagnostic, cancellationToken, out
Fix
fix))
81
private static bool TryGetFix(SyntaxNode root, SemanticModel model, Diagnostic diagnostic, CancellationToken cancellationToken, out
Fix
fix)
144
out
Fix
fix)
196
fix =
Fix
.Declaration(ifStatement, matchDeclarationStatement, variableName);
213
out
Fix
fix)
315
fix =
Fix
.Assignment(ifStatement, preDecl, assignmentStatement, variableName);
644
public static
Fix
Declaration(IfStatementSyntax ifStatement, LocalDeclarationStatementSyntax matchDeclarationStatement, string variableName)
647
public static
Fix
Assignment(IfStatementSyntax ifStatement, LocalDeclarationStatementSyntax preDeclaration, ExpressionStatementSyntax assignmentStatement, string variableName)