src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
18using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (1)
24using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
23using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
25using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForCreateCodeFixProvider.cs (1)
23using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
32using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
21using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
21using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfCodeFixProvider.cs (1)
21using static SyntaxFactory;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.ExpressionSyntaxGeneratorVisitor.cs (1)
12using static SyntaxFactory;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
18using static SyntaxFactory;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
25using static SyntaxFactory;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (38)
34=> SyntaxFactory.CarriageReturnLineFeed;
37=> SyntaxFactory.ElasticCarriageReturnLineFeed;
46=> SyntaxFactory.EndOfLine(text);
49=> SyntaxFactory.Comment("//" + text);
53return SyntaxFactory.LocalDeclarationStatement(
62=> SyntaxFactory.EqualsValueClause(operatorToken, (ExpressionSyntax)value);
66return SyntaxFactory.VariableDeclaration(
67type == null ? SyntaxFactory.IdentifierName("var") : (TypeSyntax)type,
68[SyntaxFactory.VariableDeclarator(
70expression == null ? null : SyntaxFactory.EqualsValueClause((ExpressionSyntax)expression))]);
74=> SyntaxFactory.Identifier(identifier);
77=> SyntaxFactory.ConditionalAccessExpression((ExpressionSyntax)expression, (ExpressionSyntax)whenNotNull);
80=> SyntaxFactory.MemberBindingExpression((SimpleNameSyntax)name);
83=> SyntaxFactory.RefExpression((ExpressionSyntax)expression);
97=> SyntaxFactory.YieldStatement(SyntaxKind.YieldReturnStatement, (ExpressionSyntax)expression);
106=> SyntaxFactory.InterpolatedStringExpression(startToken, [.. content.Cast<InterpolatedStringContentSyntax>()], endToken);
109=> SyntaxFactory.InterpolatedStringText(textToken);
112=> SyntaxFactory.Token(
119=> SyntaxFactory.Interpolation((ExpressionSyntax)syntaxNode);
122=> SyntaxFactory.InterpolationAlignmentClause(CommaToken, (ExpressionSyntax)alignment);
125=> SyntaxFactory.InterpolationFormatClause(
127SyntaxFactory.Token(default, SyntaxKind.InterpolatedStringTextToken, format, format, default));
130=> SyntaxFactory.TypeParameterList([.. typeParameterNames.Select(SyntaxFactory.TypeParameter)]);
175return SyntaxFactory.TokenList(result);
198=> SyntaxFactory.IsPatternExpression(
204=> SyntaxFactory.BinaryPattern(SyntaxKind.AndPattern, (PatternSyntax)Parenthesize(left), (PatternSyntax)Parenthesize(right));
207=> SyntaxFactory.ConstantPattern((ExpressionSyntax)expression);
210=> SyntaxFactory.DeclarationPattern(
212SyntaxFactory.SingleVariableDesignation(name.ToIdentifierToken()));
215=> SyntaxFactory.RelationalPattern(LessThanToken, (ExpressionSyntax)expression);
218=> SyntaxFactory.RelationalPattern(LessThanEqualsToken, (ExpressionSyntax)expression);
221=> SyntaxFactory.RelationalPattern(GreaterThanToken, (ExpressionSyntax)expression);
224=> SyntaxFactory.RelationalPattern(GreaterThanEqualsToken, (ExpressionSyntax)expression);
227=> SyntaxFactory.UnaryPattern(NotKeyword, (PatternSyntax)Parenthesize(pattern));
230=> SyntaxFactory.BinaryPattern(SyntaxKind.OrPattern, (PatternSyntax)Parenthesize(left), (PatternSyntax)Parenthesize(right));
236=> SyntaxFactory.TypePattern((TypeSyntax)type);
239=> SyntaxFactory.UnaryPattern(operatorToken, (PatternSyntax)Parenthesize(pattern));
ConvertBetweenRegularAndVerbatimString\ConvertBetweenRegularAndVerbatimStringCodeRefactoringProvider.cs (1)
58=> SyntaxFactory.Token(
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider_DocumentationComments.cs (1)
15using static SyntaxFactory;
EditAndContinue\SyntaxComparer.cs (10)
728if (!SyntaxFactory.AreEquivalent(leftBody, rightBody, null))
756return SyntaxFactory.AreEquivalent(left, right, ignoreChildFunction);
761return SyntaxFactory.AreEquivalent(left.Labels, right.Labels, null)
762&& SyntaxFactory.AreEquivalent(left.Statements, right.Statements, ignoreChildNode: HasLabel);
1517if (weightedDistance == ExactMatchDist && !SyntaxFactory.AreEquivalent(oldNode, newNode))
1530if (SyntaxFactory.AreEquivalent(oldNode, newNode))
1553Debug.Assert(!SyntaxFactory.AreEquivalent(leftToken, rightToken) || distance == ExactMatchDist);
1561Debug.Assert(!SyntaxFactory.AreEquivalent(leftNode, rightNode) || distance == ExactMatchDist);
1659=> SyntaxFactory.AreEquivalent(oldElement, newElement);
1667=> SyntaxFactory.AreEquivalent(oldElement, newElement);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
25using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (1)
18using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessCodeFixProvider.cs (1)
24using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
23using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
25using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForCreateCodeFixProvider.cs (1)
23using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
32using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionInitializer.cs (1)
21using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\UseExplicitArrayInExpressionTree\CSharpUseExplicitArrayInExpressionTreeCodeFixProvider.cs (1)
21using static SyntaxFactory;
src\Analyzers\CSharp\CodeFixes\UseUnboundGenericTypeInNameOf\CSharpUseUnboundGenericTypeInNameOfCodeFixProvider.cs (1)
21using static SyntaxFactory;