131 references to ObjectCreationExpression
Microsoft.CodeAnalysis.CSharp (11)
Binder\Binder_Expressions.cs (2)
615case SyntaxKind.ObjectCreationExpression: 3028case SyntaxKind.ObjectCreationExpression:
Binder\EarlyWellKnownAttributeBinder.cs (1)
63case SyntaxKind.ObjectCreationExpression:
Compilation\CSharpSemanticModel.cs (3)
2039boundNodeForSyntacticParent.Syntax.Kind() == SyntaxKind.ObjectCreationExpression && 3370if (expr.Syntax.Kind() is SyntaxKind.ObjectCreationExpression or SyntaxKind.ImplicitObjectCreationExpression) 3397boundNodeForSyntacticParent.Syntax.Kind() == SyntaxKind.ObjectCreationExpression &&
Parser\LanguageParser.cs (1)
10836case SyntaxKind.ObjectCreationExpression:
Syntax\SyntaxFactory.cs (1)
2212case SyntaxKind.ObjectCreationExpression:
Syntax\SyntaxFacts.cs (3)
116case ObjectCreationExpression: 326case ObjectCreationExpression: 401case ObjectCreationExpression:
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
107if (invocationOrCreation?.Kind() is not SyntaxKind.InvocationExpression and not SyntaxKind.ObjectCreationExpression)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
27context.RegisterSyntaxNodeAction(context => AnalyzeObjectCreationExpression(context, expressionType), SyntaxKind.ObjectCreationExpression);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
1020if (objectCreation.Initializer.IsKind(SyntaxKind.ObjectCreationExpression) && objectCreation.Initializer.Expressions.Count > 0)
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
35=> context.RegisterSyntaxNodeAction(AnalyzeSyntax, SyntaxKind.ObjectCreationExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
79if (initializerExpression.Kind() is SyntaxKind.ObjectCreationExpression or SyntaxKind.ArrayCreationExpression &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
704case SyntaxKind.ObjectCreationExpression:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
233if (type.IsParentKind(SyntaxKind.ObjectCreationExpression) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
109public int ObjectCreationExpression => (int)SyntaxKind.ObjectCreationExpression;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (2)
586SyntaxKind.ObjectCreationExpression; 603SyntaxKind.ObjectCreationExpression => ((ObjectCreationExpressionSyntax)expression).ArgumentList,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\CSharpGenerateEnumMemberService.cs (1)
42or SyntaxKind.ObjectCreationExpression
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (2)
457or SyntaxKind.ObjectCreationExpression 471is SyntaxKind.ObjectCreationExpression
Microsoft.CodeAnalysis.CSharp.Features (15)
ChangeSignature\CSharpChangeSignatureService.cs (4)
63SyntaxKind.ObjectCreationExpression, 77SyntaxKind.ObjectCreationExpression, 95SyntaxKind.ObjectCreationExpression, 272case SyntaxKind.ObjectCreationExpression:
CodeRefactorings\InlineMethod\CSharpInlineMethodRefactoringProvider.cs (1)
93or SyntaxKind.ObjectCreationExpression
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
238if (descendantNodesAndSelf.Any(n => n.Kind() is SyntaxKind.ObjectCreationExpression or SyntaxKind.InvocationExpression))
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
113if (token.IsKind(SyntaxKind.NewKeyword) && token.Parent.IsKind(SyntaxKind.ObjectCreationExpression))
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (1)
151if (parent is (kind: SyntaxKind.ObjectCreationExpression or SyntaxKind.ImplicitObjectCreationExpression))
Debugging\CSharpProximityExpressionsService_ExpressionTermCollector.cs (1)
98case SyntaxKind.ObjectCreationExpression:
ExtractMethod\CSharpSelectionResult.ExpressionResult.cs (1)
106if ((!node.IsKind(SyntaxKind.ObjectCreationExpression) && semanticModel.GetMemberGroup(expression).Length > 0) ||
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
107if (invocationOrCreation?.Kind() is not SyntaxKind.InvocationExpression and not SyntaxKind.ObjectCreationExpression)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForNewDiagnosticAnalyzer.cs (1)
27context.RegisterSyntaxNodeAction(context => AnalyzeObjectCreationExpression(context, expressionType), SyntaxKind.ObjectCreationExpression);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
1020if (objectCreation.Initializer.IsKind(SyntaxKind.ObjectCreationExpression) && objectCreation.Initializer.Expressions.Count > 0)
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
35=> context.RegisterSyntaxNodeAction(AnalyzeSyntax, SyntaxKind.ObjectCreationExpression);
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\CSharpGenerateEnumMemberService.cs (1)
42or SyntaxKind.ObjectCreationExpression
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (80)
Parsing\AwaitParsingTests.cs (1)
707N(SyntaxKind.ObjectCreationExpression);
Parsing\DeclarationScopeParsingTests.cs (4)
8058N(SyntaxKind.ObjectCreationExpression); 8107N(SyntaxKind.ObjectCreationExpression); 8206N(SyntaxKind.ObjectCreationExpression); 8269N(SyntaxKind.ObjectCreationExpression);
Parsing\ExpressionParsingTests.cs (18)
1140Assert.Equal(SyntaxKind.ObjectCreationExpression, expr.Kind()); 1162Assert.Equal(SyntaxKind.ObjectCreationExpression, expr.Kind()); 1185Assert.Equal(SyntaxKind.ObjectCreationExpression, expr.Kind()); 1208Assert.Equal(SyntaxKind.ObjectCreationExpression, expr.Kind()); 1236Assert.Equal(SyntaxKind.ObjectCreationExpression, expr.Kind()); 1259Assert.Equal(SyntaxKind.ObjectCreationExpression, expr.Kind()); 1283Assert.Equal(SyntaxKind.ObjectCreationExpression, expr.Kind()); 1309Assert.Equal(SyntaxKind.ObjectCreationExpression, expr.Kind()); 1333Assert.Equal(SyntaxKind.ObjectCreationExpression, expr.Kind()); 1565N(SyntaxKind.ObjectCreationExpression); 1651N(SyntaxKind.ObjectCreationExpression); 1779N(SyntaxKind.ObjectCreationExpression); 1811N(SyntaxKind.ObjectCreationExpression); 3027Assert.Equal(SyntaxKind.ObjectCreationExpression, expr.Kind()); 4896N(SyntaxKind.ObjectCreationExpression); 6150N(SyntaxKind.ObjectCreationExpression); 6191N(SyntaxKind.ObjectCreationExpression); 6227N(SyntaxKind.ObjectCreationExpression);
Parsing\FieldKeywordParsingTests.cs (1)
1660N(SyntaxKind.ObjectCreationExpression);
Parsing\FunctionPointerTests.cs (1)
2024N(SyntaxKind.ObjectCreationExpression);
Parsing\ImplicitObjectCreationParsingTests.cs (4)
28N(SyntaxKind.ObjectCreationExpression); 49N(SyntaxKind.ObjectCreationExpression); 135N(SyntaxKind.ObjectCreationExpression); 225N(SyntaxKind.ObjectCreationExpression);
Parsing\LambdaAttributeParsingTests.cs (2)
1053N(SyntaxKind.ObjectCreationExpression); 1106N(SyntaxKind.ObjectCreationExpression);
Parsing\LocalFunctionParsingTests.cs (5)
1442N(SyntaxKind.ObjectCreationExpression); 1490N(SyntaxKind.ObjectCreationExpression); 1544N(SyntaxKind.ObjectCreationExpression); 1592N(SyntaxKind.ObjectCreationExpression); 1649N(SyntaxKind.ObjectCreationExpression);
Parsing\MemberDeclarationParsingTests.cs (1)
12507N(SyntaxKind.ObjectCreationExpression);
Parsing\NullableParsingTests.cs (1)
1442N(SyntaxKind.ObjectCreationExpression);
Parsing\ParsingErrorRecoveryTests.cs (22)
5063Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 5089Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 5119Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 5148Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 5178Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 5230N(SyntaxKind.ObjectCreationExpression); 5342N(SyntaxKind.ObjectCreationExpression); 5489N(SyntaxKind.ObjectCreationExpression); 5602N(SyntaxKind.ObjectCreationExpression); 5739N(SyntaxKind.ObjectCreationExpression); 5831Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 5871Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 5900Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 5929Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 5959Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 5988Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 6021Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 6048Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 6075Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 6102Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 6130Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind()); 6157Assert.Equal(SyntaxKind.ObjectCreationExpression, ds.Declaration.Variables[0].Initializer.Value.Kind());
Parsing\PatternParsingTests.cs (1)
12705N(SyntaxKind.ObjectCreationExpression);
Parsing\RecordParsing.cs (1)
3761N(SyntaxKind.ObjectCreationExpression);
Parsing\RefFieldParsingTests.cs (6)
701N(SyntaxKind.ObjectCreationExpression); 745N(SyntaxKind.ObjectCreationExpression); 792N(SyntaxKind.ObjectCreationExpression); 850N(SyntaxKind.ObjectCreationExpression); 882N(SyntaxKind.ObjectCreationExpression); 940N(SyntaxKind.ObjectCreationExpression);
Parsing\RefReadonlyTests.cs (1)
463N(SyntaxKind.ObjectCreationExpression);
Parsing\ScriptParsingTests.cs (1)
107N(SyntaxKind.ObjectCreationExpression);
Parsing\StatementAttributeParsingTests.cs (2)
5239N(SyntaxKind.ObjectCreationExpression); 5317N(SyntaxKind.ObjectCreationExpression);
Parsing\StatementParsingTests.cs (4)
4074N(SyntaxKind.ObjectCreationExpression); 4133N(SyntaxKind.ObjectCreationExpression); 4260N(SyntaxKind.ObjectCreationExpression); 4629N(SyntaxKind.ObjectCreationExpression);
Parsing\SwitchExpressionParsingTests.cs (1)
429N(SyntaxKind.ObjectCreationExpression);
Parsing\TopLevelStatementsParsingTests.cs (2)
1591N(SyntaxKind.ObjectCreationExpression); 1847N(SyntaxKind.ObjectCreationExpression);
Parsing\TypeArgumentListParsingTests.cs (1)
745N(SyntaxKind.ObjectCreationExpression);
Microsoft.CodeAnalysis.CSharp.Workspaces (9)
Simplification\CSharpSimplificationService.Expander.cs (1)
643if (symbol.IsConstructor() && (parent.Kind() == SyntaxKind.ObjectCreationExpression || parent.Kind() == SyntaxKind.NameMemberCref))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
79if (initializerExpression.Kind() is SyntaxKind.ObjectCreationExpression or SyntaxKind.ArrayCreationExpression &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
704case SyntaxKind.ObjectCreationExpression:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
233if (type.IsParentKind(SyntaxKind.ObjectCreationExpression) &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
109public int ObjectCreationExpression => (int)SyntaxKind.ObjectCreationExpression;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\SpeculationAnalyzer.cs (2)
586SyntaxKind.ObjectCreationExpression; 603SyntaxKind.ObjectCreationExpression => ((ObjectCreationExpressionSyntax)expression).ArgumentList,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (2)
457or SyntaxKind.ObjectCreationExpression 471is SyntaxKind.ObjectCreationExpression
Microsoft.CodeAnalysis.Test.Utilities (2)
Compilation\ControlFlowGraphVerifier.cs (1)
1101case CSharp.SyntaxKind.ObjectCreationExpression:
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
629protected override SyntaxKind ObjectCreationExpressionKind => SyntaxKind.ObjectCreationExpression;
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\MethodXml\MethodXmlBuilder.cs (1)
195case SyntaxKind.ObjectCreationExpression: