16 references to Parenthesize
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (16)
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
249
switchStatement.Expression.
Parenthesize
(),
CSharpAsAndNullCheckCodeFixProvider.cs (1)
180
return SyntaxFactory.PrefixUnaryExpression(SyntaxKind.LogicalNotExpression, isPatternExpression.
Parenthesize
());
CSharpRemoveUnnecessaryCastCodeFixProvider.cs (1)
81
.
Parenthesize
();
CSharpRemoveUnnecessaryLambdaExpressionCodeFixProvider.cs (1)
57
return invocation.Expression.WithTriviaFrom(current).
Parenthesize
();
CSharpSyntaxGeneratorInternal.cs (1)
77
ExpressionSyntax expression => expression.
Parenthesize
(includeElasticTrivia, addSimplifierAnnotation),
CSharpUseIsNullCheckForReferenceEqualsCodeFixProvider.cs (4)
39
=> BinaryExpression(SyntaxKind.EqualsExpression, argument, s_nullLiteralExpression).
Parenthesize
();
42
=> IsPatternExpression(argument, s_nullLiteralPattern).
Parenthesize
();
52
s_nullLiteralPattern)).
Parenthesize
();
59
PredefinedType(Token(SyntaxKind.ObjectKeyword))).
Parenthesize
();
CSharpUsePatternCombinatorsCodeFixProvider.cs (2)
135
return CastExpression(governingType.GenerateTypeSyntax(), expr.
Parenthesize
()).WithAdditionalAnnotations(Simplifier.Annotation);
138
return expr.
Parenthesize
();
CSharpUseRangeOperatorCodeFixProvider.cs (2)
184
startExpr != null && startFromEnd ? IndexExpression(startExpr) : startExpr?.
Parenthesize
(),
185
endExpr != null && endFromEnd ? IndexExpression(endExpr) : endExpr?.
Parenthesize
());
ExpressionSyntaxExtensions.cs (1)
88
var parenthesized = expression.
Parenthesize
();
Helpers.cs (1)
20
expr.
Parenthesize
());
InvokeDelegateWithConditionalAccessCodeFixProvider.cs (1)
147
localDeclarationStatement.Declaration.Variables[0].Initializer!.Value.
Parenthesize
(),