56 references to CollectionInitializerExpression
Microsoft.CodeAnalysis.CSharp (7)
Binder\Binder_Expressions.cs (4)
5579case SyntaxKind.CollectionInitializerExpression: 5601case SyntaxKind.CollectionInitializerExpression: 5753bool isRhsNestedInitializer = rhsKind is SyntaxKind.ObjectInitializerExpression or SyntaxKind.CollectionInitializerExpression; 6199Debug.Assert(initializerSyntax.Kind() == SyntaxKind.CollectionInitializerExpression);
Compilation\CSharpSemanticModel.cs (2)
70case SyntaxKind.CollectionInitializerExpression: 612if (expression.Parent != null && expression.Parent.Kind() == SyntaxKind.CollectionInitializerExpression)
Parser\LanguageParser.cs (1)
12951var kind = isObjectInitializer(initializers) ? SyntaxKind.ObjectInitializerExpression : SyntaxKind.CollectionInitializerExpression;
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
222Initializer: null or { RawKind: (int)SyntaxKind.CollectionInitializerExpression }
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
110else if (elements is [{ Syntax.Parent: (kind: SyntaxKind.CollectionInitializerExpression) }, ..])
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
478or SyntaxKind.CollectionInitializerExpression 566case SyntaxKind.CollectionInitializerExpression:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
133or SyntaxKind.CollectionInitializerExpression 344currentToken.Parent.Kind() is SyntaxKind.ObjectInitializerExpression or SyntaxKind.CollectionInitializerExpression or SyntaxKind.WithInitializerExpression or SyntaxKind.PropertyPatternClause)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
1585=> node is InitializerExpressionSyntax(SyntaxKind.CollectionInitializerExpression); 1777=> node is InitializerExpressionSyntax(SyntaxKind.CollectionInitializerExpression) initExpr ? initExpr.Expressions : default;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
97public int CollectionInitializerExpression => (int)SyntaxKind.CollectionInitializerExpression;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
515else if (currentOriginalNode.Kind() == SyntaxKind.CollectionInitializerExpression)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
105SyntaxKind.CollectionInitializerExpression,
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
30: SyntaxKind.CollectionInitializerExpression;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
2866token.Parent.Parent is (kind: SyntaxKind.ObjectInitializerExpression or SyntaxKind.CollectionInitializerExpression))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1323else if (initializerExpression.IsKind(SyntaxKind.CollectionInitializerExpression))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
CompleteStatement\CompleteStatementCommandHandler.cs (1)
222SyntaxKind.CollectionInitializerExpression or
Microsoft.CodeAnalysis.CSharp.Features (8)
AddImport\CSharpAddImportFeatureService.cs (3)
64else if (node.Parent.IsKind(SyntaxKind.CollectionInitializerExpression)) 615if (expression.IsKind(SyntaxKind.CollectionInitializerExpression)) 633if (node.Parent.IsKind(SyntaxKind.CollectionInitializerExpression))
BraceCompletion\CurlyBraceCompletionService.cs (1)
141SyntaxKind.CollectionInitializerExpression or
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
222Initializer: null or { RawKind: (int)SyntaxKind.CollectionInitializerExpression }
src\Analyzers\CSharp\Analyzers\UseUtf8StringLiteral\UseUtf8StringLiteralDiagnosticAnalyzer.cs (1)
110else if (elements is [{ Syntax.Parent: (kind: SyntaxKind.CollectionInitializerExpression) }, ..])
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
105SyntaxKind.CollectionInitializerExpression,
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
30: SyntaxKind.CollectionInitializerExpression;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\ImplicitObjectCreationTests.cs (1)
4532where node.IsKind(SyntaxKind.CollectionInitializerExpression)
Semantics\ObjectAndCollectionInitializerTests.cs (5)
3472where node.IsKind(SyntaxKind.CollectionInitializerExpression) 3520where node.IsKind(SyntaxKind.CollectionInitializerExpression) 3577where node.IsKind(SyntaxKind.CollectionInitializerExpression) 3613where node.IsKind(SyntaxKind.CollectionInitializerExpression) 3650where node.IsKind(SyntaxKind.CollectionInitializerExpression)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
Parsing\ExpressionParsingTests.cs (2)
6198N(SyntaxKind.CollectionInitializerExpression); 6234N(SyntaxKind.CollectionInitializerExpression);
Parsing\ImplicitObjectCreationParsingTests.cs (1)
617N(SyntaxKind.CollectionInitializerExpression);
Parsing\LambdaAttributeParsingTests.cs (1)
1113N(SyntaxKind.CollectionInitializerExpression);
Parsing\NullableParsingTests.cs (1)
1479N(SyntaxKind.CollectionInitializerExpression);
Parsing\RefFieldParsingTests.cs (3)
752N(SyntaxKind.CollectionInitializerExpression); 857N(SyntaxKind.CollectionInitializerExpression); 947N(SyntaxKind.CollectionInitializerExpression);
Microsoft.CodeAnalysis.CSharp.Workspaces (10)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
478or SyntaxKind.CollectionInitializerExpression 566case SyntaxKind.CollectionInitializerExpression:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (2)
133or SyntaxKind.CollectionInitializerExpression 344currentToken.Parent.Kind() is SyntaxKind.ObjectInitializerExpression or SyntaxKind.CollectionInitializerExpression or SyntaxKind.WithInitializerExpression or SyntaxKind.PropertyPatternClause)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (2)
1585=> node is InitializerExpressionSyntax(SyntaxKind.CollectionInitializerExpression); 1777=> node is InitializerExpressionSyntax(SyntaxKind.CollectionInitializerExpression) initExpr ? initExpr.Expressions : default;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
97public int CollectionInitializerExpression => (int)SyntaxKind.CollectionInitializerExpression;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (1)
515else if (currentOriginalNode.Kind() == SyntaxKind.CollectionInitializerExpression)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
2866token.Parent.Parent is (kind: SyntaxKind.ObjectInitializerExpression or SyntaxKind.CollectionInitializerExpression))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
1323else if (initializerExpression.IsKind(SyntaxKind.CollectionInitializerExpression))
Microsoft.CodeAnalysis.Test.Utilities (1)
Compilation\ControlFlowGraphVerifier.cs (1)
1149(assignment.Right.Kind() == CSharp.SyntaxKind.CollectionInitializerExpression ||
Microsoft.Interop.ComInterfaceGenerator (1)
VirtualMethodPointerStubGenerator.cs (1)
159InitializerExpression(SyntaxKind.CollectionInitializerExpression,