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