56 references to CollectionInitializerExpression
Microsoft.CodeAnalysis.CSharp (7)
Binder\Binder_Expressions.cs (4)
5576case SyntaxKind.CollectionInitializerExpression: 5598case SyntaxKind.CollectionInitializerExpression: 5750bool isRhsNestedInitializer = rhsKind is SyntaxKind.ObjectInitializerExpression or SyntaxKind.CollectionInitializerExpression; 6196Debug.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)
12886var kind = isObjectInitializer(initializers) ? SyntaxKind.ObjectInitializerExpression : SyntaxKind.CollectionInitializerExpression;
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
233Initializer: 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)
477or SyntaxKind.CollectionInitializerExpression 565case 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)
1575=> node is InitializerExpressionSyntax(SyntaxKind.CollectionInitializerExpression); 1759=> node is InitializerExpressionSyntax(SyntaxKind.CollectionInitializerExpression) initExpr ? initExpr.Expressions : default;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
94public 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)
1307else if (initializerExpression.IsKind(SyntaxKind.CollectionInitializerExpression))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
CompleteStatement\CompleteStatementCommandHandler.cs (1)
204SyntaxKind.CollectionInitializerExpression or
Microsoft.CodeAnalysis.CSharp.Features (8)
AddImport\CSharpAddImportFeatureService.cs (3)
68else if (node.Parent.IsKind(SyntaxKind.CollectionInitializerExpression)) 608if (expression.IsKind(SyntaxKind.CollectionInitializerExpression)) 626if (node.Parent.IsKind(SyntaxKind.CollectionInitializerExpression))
BraceCompletion\CurlyBraceCompletionService.cs (1)
141SyntaxKind.CollectionInitializerExpression or
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
233Initializer: 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)
477or SyntaxKind.CollectionInitializerExpression 565case 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)
1575=> node is InitializerExpressionSyntax(SyntaxKind.CollectionInitializerExpression); 1759=> node is InitializerExpressionSyntax(SyntaxKind.CollectionInitializerExpression) initExpr ? initExpr.Expressions : default;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
94public 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)
1307else 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,