71 references to ObjectInitializerExpression
Microsoft.CodeAnalysis.CSharp (12)
Binder\Binder.IdentifierUsedAsValueFinder.cs (1)
69assignment.Parent?.Kind() is SyntaxKind.ObjectInitializerExpression or SyntaxKind.WithInitializerExpression)
Binder\Binder_Expressions.cs (6)
784case SyntaxKind.ObjectInitializerExpression: 5570case SyntaxKind.ObjectInitializerExpression: 5600case SyntaxKind.ObjectInitializerExpression: 5623Debug.Assert(initializerSyntax.Kind() == SyntaxKind.ObjectInitializerExpression || 5627if (initializerSyntax.Kind() == SyntaxKind.ObjectInitializerExpression) 5753bool isRhsNestedInitializer = rhsKind is SyntaxKind.ObjectInitializerExpression or SyntaxKind.CollectionInitializerExpression;
Compilation\CSharpSemanticModel.cs (2)
71case SyntaxKind.ObjectInitializerExpression: 623initializer.Parent.Parent.Kind() == SyntaxKind.ObjectInitializerExpression)
Compiler\MethodCompiler.cs (1)
2087assignment.Parent?.Kind() is SyntaxKind.ObjectInitializerExpression or SyntaxKind.WithInitializerExpression)
Parser\LanguageParser.cs (1)
12951var kind = isObjectInitializer(initializers) ? SyntaxKind.ObjectInitializerExpression : SyntaxKind.CollectionInitializerExpression;
Syntax\SyntaxFacts.cs (1)
328case ObjectInitializerExpression:
Microsoft.CodeAnalysis.CSharp.CodeStyle (10)
src\Analyzers\CSharp\Analyzers\QualifyMemberAccess\CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
44if (node.Parent is AssignmentExpressionSyntax { Parent: InitializerExpressionSyntax(SyntaxKind.ObjectInitializerExpression), Left: var left } &&
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
43RawKind: (int)SyntaxKind.ObjectInitializerExpression,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
479or SyntaxKind.ObjectInitializerExpression
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
47token.Parent.IsKind(SyntaxKind.ObjectInitializerExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (3)
132if (currentToken.Parent.Kind() is SyntaxKind.ObjectInitializerExpression 246if (previousToken.IsKind(SyntaxKind.CommaToken) && previousToken.Parent.IsKind(SyntaxKind.ObjectInitializerExpression)) 344currentToken.Parent.Kind() is SyntaxKind.ObjectInitializerExpression or SyntaxKind.CollectionInitializerExpression or SyntaxKind.WithInitializerExpression or SyntaxKind.PropertyPatternClause)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (3)
663else if (identifier.Parent.IsParentKind(SyntaxKind.ObjectInitializerExpression)) 1582=> node is InitializerExpressionSyntax(SyntaxKind.ObjectInitializerExpression); 1774=> node is InitializerExpressionSyntax(SyntaxKind.ObjectInitializerExpression) initExpr ? initExpr.Expressions : default;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
29? SyntaxKind.ObjectInitializerExpression
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
2486if (token.Parent.IsKind(SyntaxKind.ObjectInitializerExpression) && token.IsKind(SyntaxKind.OpenBraceToken)) 2866token.Parent.Parent is (kind: SyntaxKind.ObjectInitializerExpression or SyntaxKind.CollectionInitializerExpression))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
325argument.Parent.Parent.Parent.IsParentKind(SyntaxKind.ObjectInitializerExpression) &&
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (1)
842=> InitializerExpression(SyntaxKind.ObjectInitializerExpression)
CompleteStatement\CompleteStatementCommandHandler.cs (1)
220SyntaxKind.ObjectInitializerExpression or
Microsoft.CodeAnalysis.CSharp.Features (6)
BraceCompletion\CurlyBraceCompletionService.cs (1)
140SyntaxKind.ObjectInitializerExpression or
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (1)
126token.Parent.Kind() is not (SyntaxKind.ObjectInitializerExpression or SyntaxKind.WithInitializerExpression))
src\Analyzers\CSharp\Analyzers\QualifyMemberAccess\CSharpQualifyMemberAccessDiagnosticAnalyzer.cs (1)
44if (node.Parent is AssignmentExpressionSyntax { Parent: InitializerExpressionSyntax(SyntaxKind.ObjectInitializerExpression), Left: var left } &&
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUseCollectionInitializerAnalyzer.cs (1)
43RawKind: (int)SyntaxKind.ObjectInitializerExpression,
src\Analyzers\CSharp\CodeFixes\UseObjectInitializer\UseInitializerHelpers.cs (1)
29? SyntaxKind.ObjectInitializerExpression
UseAutoProperty\UseAutoPropertyRewriter.cs (1)
47Parent: InitializerExpressionSyntax { RawKind: (int)SyntaxKind.ObjectInitializerExpression }
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (22)
Generated\Syntax.Test.xml.Generated.cs (2)
188=> InternalSyntaxFactory.InitializerExpression(SyntaxKind.ObjectInitializerExpression, InternalSyntaxFactory.Token(SyntaxKind.OpenBraceToken), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SeparatedSyntaxList<Syntax.InternalSyntax.ExpressionSyntax>(), InternalSyntaxFactory.Token(SyntaxKind.CloseBraceToken)); 10404=> SyntaxFactory.InitializerExpression(SyntaxKind.ObjectInitializerExpression, SyntaxFactory.Token(SyntaxKind.OpenBraceToken), new SeparatedSyntaxList<ExpressionSyntax>(), SyntaxFactory.Token(SyntaxKind.CloseBraceToken));
Parsing\ExpressionParsingTests.cs (3)
1351Assert.Equal(SyntaxKind.ObjectInitializerExpression, b.Right.Kind()); 4903N(SyntaxKind.ObjectInitializerExpression); 6157N(SyntaxKind.ObjectInitializerExpression);
Parsing\ImplicitObjectCreationParsingTests.cs (4)
442N(SyntaxKind.ObjectInitializerExpression); 475N(SyntaxKind.ObjectInitializerExpression); 511N(SyntaxKind.ObjectInitializerExpression); 577N(SyntaxKind.ObjectInitializerExpression);
Parsing\LambdaAttributeParsingTests.cs (3)
1060N(SyntaxKind.ObjectInitializerExpression); 2714N(SyntaxKind.ObjectInitializerExpression); 2808N(SyntaxKind.ObjectInitializerExpression);
Parsing\ParsingErrorRecoveryTests.cs (5)
5237N(SyntaxKind.ObjectInitializerExpression); 5349N(SyntaxKind.ObjectInitializerExpression); 5496N(SyntaxKind.ObjectInitializerExpression); 5609N(SyntaxKind.ObjectInitializerExpression); 5746N(SyntaxKind.ObjectInitializerExpression);
Parsing\RefFieldParsingTests.cs (3)
708N(SyntaxKind.ObjectInitializerExpression); 799N(SyntaxKind.ObjectInitializerExpression); 889N(SyntaxKind.ObjectInitializerExpression);
Parsing\StatementParsingTests.cs (2)
4101N(SyntaxKind.ObjectInitializerExpression); 4271N(SyntaxKind.ObjectInitializerExpression);
Microsoft.CodeAnalysis.CSharp.Workspaces (12)
Simplification\CSharpSimplificationService.Expander.cs (1)
873if (parent.Kind() is SyntaxKind.ObjectInitializerExpression or SyntaxKind.WithInitializerExpression)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
479or SyntaxKind.ObjectInitializerExpression
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
47token.Parent.IsKind(SyntaxKind.ObjectInitializerExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (3)
132if (currentToken.Parent.Kind() is SyntaxKind.ObjectInitializerExpression 246if (previousToken.IsKind(SyntaxKind.CommaToken) && previousToken.Parent.IsKind(SyntaxKind.ObjectInitializerExpression)) 344currentToken.Parent.Kind() is SyntaxKind.ObjectInitializerExpression or SyntaxKind.CollectionInitializerExpression or SyntaxKind.WithInitializerExpression or SyntaxKind.PropertyPatternClause)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (3)
663else if (identifier.Parent.IsParentKind(SyntaxKind.ObjectInitializerExpression)) 1582=> node is InitializerExpressionSyntax(SyntaxKind.ObjectInitializerExpression); 1774=> node is InitializerExpressionSyntax(SyntaxKind.ObjectInitializerExpression) initExpr ? initExpr.Expressions : default;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
2486if (token.Parent.IsKind(SyntaxKind.ObjectInitializerExpression) && token.IsKind(SyntaxKind.OpenBraceToken)) 2866token.Parent.Parent is (kind: SyntaxKind.ObjectInitializerExpression or SyntaxKind.CollectionInitializerExpression))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (1)
325argument.Parent.Parent.Parent.IsParentKind(SyntaxKind.ObjectInitializerExpression) &&
Microsoft.CodeAnalysis.Test.Utilities (2)
Compilation\ControlFlowGraphVerifier.cs (2)
1148assignment.Parent?.Kind() == CSharp.SyntaxKind.ObjectInitializerExpression && 1150assignment.Right.Kind() == CSharp.SyntaxKind.ObjectInitializerExpression))
Microsoft.Interop.ComInterfaceGenerator (1)
ComClassGenerator.cs (1)
143InitializerExpression(SyntaxKind.ObjectInitializerExpression,