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