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)
65if (!TryGetFix(editor.OriginalRoot, model, diagnostic, cancellationToken, out Fix fix)) 81private static bool TryGetFix(SyntaxNode root, SemanticModel model, Diagnostic diagnostic, CancellationToken cancellationToken, out Fix fix) 144out Fix fix) 196fix = Fix.Declaration(ifStatement, matchDeclarationStatement, variableName); 213out Fix fix) 315fix = Fix.Assignment(ifStatement, preDecl, assignmentStatement, variableName); 644public static Fix Declaration(IfStatementSyntax ifStatement, LocalDeclarationStatementSyntax matchDeclarationStatement, string variableName) 647public static Fix Assignment(IfStatementSyntax ifStatement, LocalDeclarationStatementSyntax preDeclaration, ExpressionStatementSyntax assignmentStatement, string variableName)