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 (49)
36=> SyntaxFactory.CarriageReturnLineFeed;
39=> SyntaxFactory.ElasticCarriageReturnLineFeed;
48=> SyntaxFactory.EndOfLine(text);
51=> SyntaxFactory.Comment("//" + text);
55return SyntaxFactory.LocalDeclarationStatement(
64=> SyntaxFactory.EqualsValueClause(operatorToken, (ExpressionSyntax)value);
68return SyntaxFactory.VariableDeclaration(
69type == null ? SyntaxFactory.IdentifierName("var") : (TypeSyntax)type,
70[SyntaxFactory.VariableDeclarator(
72expression == null ? null : SyntaxFactory.EqualsValueClause((ExpressionSyntax)expression))]);
76=> SyntaxFactory.Identifier(identifier);
79=> SyntaxFactory.ConditionalAccessExpression((ExpressionSyntax)expression, (ExpressionSyntax)whenNotNull);
82=> SyntaxFactory.MemberBindingExpression((SimpleNameSyntax)name);
85=> SyntaxFactory.RefExpression((ExpressionSyntax)expression);
99=> SyntaxFactory.YieldStatement(SyntaxKind.YieldReturnStatement, (ExpressionSyntax)expression);
108=> SyntaxFactory.InterpolatedStringExpression(startToken, [.. content.Cast<InterpolatedStringContentSyntax>()], endToken);
111=> SyntaxFactory.InterpolatedStringText(textToken);
114=> SyntaxFactory.Token(
121=> SyntaxFactory.Interpolation((ExpressionSyntax)syntaxNode);
124=> SyntaxFactory.InterpolationAlignmentClause(CommaToken, (ExpressionSyntax)alignment);
127=> SyntaxFactory.InterpolationFormatClause(
129SyntaxFactory.Token(default, SyntaxKind.InterpolatedStringTextToken, format, format, default));
132=> SyntaxFactory.TypeParameterList([.. typeParameterNames.Select(SyntaxFactory.TypeParameter)]);
177return SyntaxFactory.TokenList(result);
200=> SyntaxFactory.IsPatternExpression(
206=> SyntaxFactory.BinaryPattern(SyntaxKind.AndPattern, (PatternSyntax)Parenthesize(left), (PatternSyntax)Parenthesize(right));
209=> SyntaxFactory.ConstantPattern((ExpressionSyntax)expression);
212=> SyntaxFactory.DeclarationPattern(
214SyntaxFactory.SingleVariableDesignation(name.ToIdentifierToken()));
217=> SyntaxFactory.RelationalPattern(LessThanToken, (ExpressionSyntax)expression);
220=> SyntaxFactory.RelationalPattern(LessThanEqualsToken, (ExpressionSyntax)expression);
223=> SyntaxFactory.RelationalPattern(GreaterThanToken, (ExpressionSyntax)expression);
226=> SyntaxFactory.RelationalPattern(GreaterThanEqualsToken, (ExpressionSyntax)expression);
229=> SyntaxFactory.UnaryPattern(NotKeyword, (PatternSyntax)Parenthesize(pattern));
232=> SyntaxFactory.BinaryPattern(SyntaxKind.OrPattern, (PatternSyntax)Parenthesize(left), (PatternSyntax)Parenthesize(right));
238=> SyntaxFactory.TypePattern((TypeSyntax)type);
241=> SyntaxFactory.UnaryPattern(operatorToken, (PatternSyntax)Parenthesize(pattern));
246=> SyntaxFactory.CastExpression((TypeSyntax)type, (ExpressionSyntax)Parenthesize(expression)).WithAdditionalAnnotations(Simplifier.Annotation);
249=> SyntaxFactory.DefaultExpression((TypeSyntax)type).WithAdditionalAnnotations(Simplifier.Annotation);
260return SyntaxFactory.LiteralExpression(SyntaxKind.NullLiteralExpression);
266return SyntaxFactory.LiteralExpression(SyntaxKind.FalseLiteralExpression);
278return SyntaxFactory.LiteralExpression(
279SyntaxKind.NumericLiteralExpression, SyntaxFactory.Literal("0", 0));
291RefKind.Ref => SyntaxFactory.RefType(type),
292RefKind.RefReadOnly => SyntaxFactory.RefType(RefKeyword, ReadOnlyKeyword, type),
302return SyntaxFactory.MemberAccessExpression(
333=> SyntaxFactory.BinaryExpression(syntaxKind, (ExpressionSyntax)Parenthesize(left), (ExpressionSyntax)Parenthesize(right));
339=> SyntaxFactory.CastExpression((TypeSyntax)type, (ExpressionSyntax)Parenthesize(expression)).WithAdditionalAnnotations(Simplifier.Annotation);
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\Analyzers\UseImplicitlyTypedLambdaExpression\CSharpUseImplicitlyTypedLambdaExpressionDiagnosticAnalyzer.cs (1)
21using 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;