190 references to RecordDeclaration
Microsoft.CodeAnalysis.CSharp (35)
Binder\Binder_Statements.cs (1)
3680Debug.Assert(typeDecl.Kind() is SyntaxKind.RecordDeclaration or SyntaxKind.ClassDeclaration or SyntaxKind.RecordStructDeclaration or SyntaxKind.StructDeclaration);
Binder\LocalBinderFactory.cs (1)
177Debug.Assert(node.Kind() is SyntaxKind.RecordDeclaration or SyntaxKind.ClassDeclaration);
Compilation\MethodBodySemanticModel.cs (2)
99case SyntaxKind.RecordDeclaration: 262Debug.Assert(typeDecl.Kind() is (SyntaxKind.RecordDeclaration or SyntaxKind.ClassDeclaration));
Compilation\SyntaxTreeSemanticModel.cs (5)
803case SyntaxKind.RecordDeclaration: 873case SyntaxKind.RecordDeclaration: 1091case SyntaxKind.RecordDeclaration: 1657case SyntaxKind.RecordDeclaration: 2433if (typeDeclaration.Kind() is (SyntaxKind.RecordDeclaration or SyntaxKind.ClassDeclaration))
Declarations\DeclarationKind.cs (1)
43case SyntaxKind.RecordDeclaration: return DeclarationKind.Record;
Declarations\DeclarationTreeBuilder.cs (2)
675SyntaxKind.RecordDeclaration => DeclarationKind.Record, 1090case SyntaxKind.RecordDeclaration:
Declarations\MergedTypeDeclaration.cs (1)
79case SyntaxKind.RecordDeclaration:
Parser\LanguageParser.cs (4)
797case SyntaxKind.RecordDeclaration: 1943SyntaxKind declarationKind = recordModifier?.Kind == SyntaxKind.StructKeyword ? SyntaxKind.RecordStructDeclaration : SyntaxKind.RecordDeclaration; 2419case SyntaxKind.RecordDeclaration: 5140case SyntaxKind.RecordDeclaration:
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
103case SyntaxKind.RecordDeclaration:
Symbols\Source\SourceConstructorSymbolBase.cs (1)
30Debug.Assert(syntax.Kind() is SyntaxKind.ConstructorDeclaration or SyntaxKind.RecordDeclaration or SyntaxKind.RecordStructDeclaration or SyntaxKind.ClassDeclaration or SyntaxKind.StructDeclaration);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
3559case SyntaxKind.RecordDeclaration:
Symbols\Source\SourceMethodSymbolWithAttributes.cs (1)
62Debug.Assert(recordDecl.IsKind(SyntaxKind.RecordDeclaration));
Symbols\Source\SourceNamedTypeSymbol.cs (3)
120case SyntaxKind.RecordDeclaration: 162case SyntaxKind.RecordDeclaration: 471case SyntaxKind.RecordDeclaration:
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
25Debug.Assert(syntax.Kind() is SyntaxKind.RecordDeclaration or SyntaxKind.RecordStructDeclaration or SyntaxKind.ClassDeclaration or SyntaxKind.StructDeclaration);
Syntax\LambdaUtilities.cs (1)
420case SyntaxKind.RecordDeclaration:
Syntax\RecordDeclarationSyntax.cs (3)
31return RecordDeclaration(SyntaxKind.RecordDeclaration, attributeLists, modifiers, keyword, classOrStructKeyword: default, identifier, 42return RecordDeclaration(SyntaxKind.RecordDeclaration, attributeLists, modifiers, keyword, classOrStructKeyword: default, identifier, 53return RecordDeclaration(SyntaxKind.RecordDeclaration, attributeLists: default, modifiers: default, keyword, classOrStructKeyword: default, identifier,
Syntax\SyntaxKindFacts.cs (2)
384case SyntaxKind.RecordDeclaration: 842return SyntaxKind.RecordDeclaration;
Syntax\TypeDeclarationSyntax.cs (4)
37if (Kind() is (SyntaxKind.RecordDeclaration or SyntaxKind.ClassDeclaration)) 77case SyntaxKind.RecordDeclaration: 129case SyntaxKind.RecordDeclaration: 130return SyntaxFactory.RecordDeclaration(SyntaxKind.RecordDeclaration, attributes, modifiers, keyword, classOrStructKeyword: default, identifier, typeParameterList, parameterList: null, baseList, constraintClauses, openBraceToken, members, closeBraceToken, semicolonToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiers.cs (1)
94case SyntaxKind.RecordDeclaration:
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (1)
66SyntaxKind.RecordDeclaration or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (3)
36case SyntaxKind.RecordDeclaration: 75case SyntaxKind.RecordDeclaration: 97case SyntaxKind.RecordDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
31case SyntaxKind.RecordDeclaration: 158case SyntaxKind.RecordDeclaration:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (15)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
414? SyntaxKind.RecordDeclaration
src\Analyzers\CSharp\CodeFixes\GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsService.cs (1)
46if (baseList.Parent is TypeDeclarationSyntax(SyntaxKind.ClassDeclaration or SyntaxKind.RecordDeclaration) parentTypeDecl &&
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
54SyntaxKind.RecordDeclaration or
src\Analyzers\CSharp\CodeFixes\MakeTypeAbstract\CSharpMakeTypeAbstractCodeFixProvider.cs (1)
50if (enclosingType?.Kind() is SyntaxKind.ClassDeclaration or SyntaxKind.RecordDeclaration &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (3)
31{ SyntaxKind.RecordDeclaration, 14 }, 139case SyntaxKind.RecordDeclaration: 352else if (node.Kind() is SyntaxKind.StructDeclaration or SyntaxKind.ClassDeclaration or SyntaxKind.RecordDeclaration or SyntaxKind.RecordStructDeclaration)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
173case SyntaxKind.RecordDeclaration: 199var declarationKind = isRecordClass ? SyntaxKind.RecordDeclaration : SyntaxKind.RecordStructDeclaration;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
231targetToken.Parent.Parent is (kind: SyntaxKind.ClassDeclaration or SyntaxKind.RecordDeclaration);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (5)
73SyntaxKind.RecordDeclaration, 83SyntaxKind.RecordDeclaration, 92SyntaxKind.RecordDeclaration, 98SyntaxKind.RecordDeclaration, 104SyntaxKind.RecordDeclaration,
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
CompleteStatement\CompleteStatementCommandHandler.cs (1)
389case SyntaxKind.RecordDeclaration:
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
49SyntaxKind.RecordDeclaration,
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Diagnostics\DiagnosticAnalyzerTests.AllInOne.cs (1)
35missingSyntaxKinds.Add(SyntaxKind.RecordDeclaration);
Diagnostics\DiagnosticAnalyzerTests.cs (1)
4081context.RegisterSyntaxNodeAction(AnalyzeRecordDeclaration, SyntaxKind.RecordDeclaration);
Semantics\PrimaryConstructorTests.cs (1)
5696Assert.Equal(SyntaxKind.RecordDeclaration, context.Operation.Syntax.Kind());
Semantics\RecordTests.cs (5)
21248Assert.Equal(SyntaxKind.RecordDeclaration, baseWithargs.Parent.Parent.Kind()); 26244context.RegisterSyntaxNodeAction(Handle6, SyntaxKind.RecordDeclaration); 26836Assert.Equal(SyntaxKind.RecordDeclaration, context.Operation.Syntax.Kind()); 26840Assert.Equal(SyntaxKind.RecordDeclaration, context.Operation.Syntax.Kind()); 27533context.RegisterSyntaxNodeAction(Handle6, SyntaxKind.RecordDeclaration);
Microsoft.CodeAnalysis.CSharp.Features (22)
ChangeSignature\CSharpChangeSignatureService.cs (3)
51SyntaxKind.RecordDeclaration, 104SyntaxKind.RecordDeclaration, 307or SyntaxKind.RecordDeclaration
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
443token.GetAncestor<ParameterSyntax>()?.Parent?.Parent is (kind: SyntaxKind.RecordDeclaration or SyntaxKind.RecordStructDeclaration))
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
142SyntaxKind.InterfaceDeclaration or SyntaxKind.RecordDeclaration or SyntaxKind.RecordStructDeclaration;
Completion\KeywordRecommenders\BaseKeywordRecommender.cs (1)
54token.Parent.Parent?.Parent is (kind: SyntaxKind.ClassDeclaration or SyntaxKind.RecordDeclaration))
Completion\KeywordRecommenders\FieldKeywordRecommender.cs (1)
20SyntaxKind.RecordDeclaration,
Diagnostics\Analyzers\CSharpSimplifyTypeNamesDiagnosticAnalyzer.cs (1)
43SyntaxKind.RecordDeclaration or
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
54case SyntaxKind.RecordDeclaration:
EditAndContinue\BreakpointSpans.cs (1)
183case SyntaxKind.RecordDeclaration:
EditAndContinue\SyntaxComparer.cs (3)
325case SyntaxKind.RecordDeclaration: 591case SyntaxKind.RecordDeclaration: 1428case SyntaxKind.RecordDeclaration:
Organizing\Organizers\MemberDeclarationsOrganizer.Comparer.cs (1)
173case SyntaxKind.RecordDeclaration:
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiers.cs (1)
94case SyntaxKind.RecordDeclaration:
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryNullableDirective\CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (1)
66SyntaxKind.RecordDeclaration or
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (1)
414? SyntaxKind.RecordDeclaration
src\Analyzers\CSharp\CodeFixes\GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsService.cs (1)
46if (baseList.Parent is TypeDeclarationSyntax(SyntaxKind.ClassDeclaration or SyntaxKind.RecordDeclaration) parentTypeDecl &&
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
54SyntaxKind.RecordDeclaration or
src\Analyzers\CSharp\CodeFixes\MakeTypeAbstract\CSharpMakeTypeAbstractCodeFixProvider.cs (1)
50if (enclosingType?.Kind() is SyntaxKind.ClassDeclaration or SyntaxKind.RecordDeclaration &&
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
103case SyntaxKind.RecordDeclaration:
src\Compilers\CSharp\Portable\Syntax\LambdaUtilities.cs (1)
420case SyntaxKind.RecordDeclaration:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\RecordStructTests.cs (1)
6422Assert.Equal(SyntaxKind.RecordDeclaration, context.Operation.Syntax.Kind());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (63)
Generated\Syntax.Test.xml.Generated.cs (2)
512=> InternalSyntaxFactory.RecordDeclaration(SyntaxKind.RecordDeclaration, new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.SyntaxToken>(), InternalSyntaxFactory.Identifier("Keyword"), null, InternalSyntaxFactory.Identifier("Identifier"), null, null, null, new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.TypeParameterConstraintClauseSyntax>(), null, new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.MemberDeclarationSyntax>(), null, null); 10728=> SyntaxFactory.RecordDeclaration(SyntaxKind.RecordDeclaration, new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Identifier("Keyword"), default(SyntaxToken), SyntaxFactory.Identifier("Identifier"), default(TypeParameterListSyntax), default(ParameterListSyntax), default(BaseListSyntax), new SyntaxList<TypeParameterConstraintClauseSyntax>(), default(SyntaxToken), new SyntaxList<MemberDeclarationSyntax>(), default(SyntaxToken), default(SyntaxToken));
Parsing\DeclarationParsingTests_MissingIdentifiers.cs (7)
2957N(SyntaxKind.RecordDeclaration); 3038N(SyntaxKind.RecordDeclaration); 3129N(SyntaxKind.RecordDeclaration); 3226N(SyntaxKind.RecordDeclaration); 3355N(SyntaxKind.RecordDeclaration); 3446N(SyntaxKind.RecordDeclaration); 3482N(SyntaxKind.RecordDeclaration);
Parsing\FileModifierParsingTests.cs (6)
195N(SyntaxKind.RecordDeclaration); 1451N(SyntaxKind.RecordDeclaration); 2779N(SyntaxKind.RecordDeclaration); 2877N(SyntaxKind.RecordDeclaration); 2972N(SyntaxKind.RecordDeclaration); 2995N(SyntaxKind.RecordDeclaration);
Parsing\MemberDeclarationParsingTests.cs (20)
9621N(SyntaxKind.RecordDeclaration); 10474[InlineData("record", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 10476[InlineData("record class", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 10557[InlineData("record", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 10559[InlineData("record class", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 10660[InlineData("record", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 10662[InlineData("record class", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 10775[InlineData("record", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 10777[InlineData("record class", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 10931[InlineData("record", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 10933[InlineData("record class", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 11106[InlineData("record", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 11108[InlineData("record class", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 11279[InlineData("record", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 11281[InlineData("record class", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 11410[InlineData("record", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 11412[InlineData("record class", SyntaxKind.RecordDeclaration, SyntaxKind.RecordKeyword)] 18485N(SyntaxKind.RecordDeclaration); 18537N(SyntaxKind.RecordDeclaration); 18609N(SyntaxKind.RecordDeclaration);
Parsing\RecordParsing.cs (27)
75N(SyntaxKind.RecordDeclaration); 172N(SyntaxKind.RecordDeclaration); 213N(SyntaxKind.RecordDeclaration); 232N(SyntaxKind.RecordDeclaration); 402N(SyntaxKind.RecordDeclaration); 414N(SyntaxKind.RecordDeclaration); 420N(SyntaxKind.RecordDeclaration); 432N(SyntaxKind.RecordDeclaration); 458N(SyntaxKind.RecordDeclaration); 502N(SyntaxKind.RecordDeclaration); 542N(SyntaxKind.RecordDeclaration); 699N(SyntaxKind.RecordDeclaration); 758N(SyntaxKind.RecordDeclaration); 915N(SyntaxKind.RecordDeclaration); 960N(SyntaxKind.RecordDeclaration); 1008N(SyntaxKind.RecordDeclaration); 2344N(SyntaxKind.RecordDeclaration); 2447N(SyntaxKind.RecordDeclaration); 3019N(SyntaxKind.RecordDeclaration); 3072N(SyntaxKind.RecordDeclaration); 3142N(SyntaxKind.RecordDeclaration); 3365N(SyntaxKind.RecordDeclaration); 3410N(SyntaxKind.RecordDeclaration); 3565N(SyntaxKind.RecordDeclaration); 3586N(SyntaxKind.RecordDeclaration); 3925N(SyntaxKind.RecordDeclaration); 4182N(@struct ? SyntaxKind.RecordStructDeclaration : SyntaxKind.RecordDeclaration);
Parsing\TopLevelStatementsParsingTests.cs (1)
3152N(SyntaxKind.RecordDeclaration);
Microsoft.CodeAnalysis.CSharp.Workspaces (24)
Classification\ClassificationHelpers.cs (2)
288SyntaxKind.RecordDeclaration => ClassificationTypeNames.RecordClassName, 341SyntaxKind.RecordDeclaration => ClassificationTypeNames.RecordClassName,
CodeGeneration\CSharpSyntaxGenerator.cs (4)
147case SyntaxKind.RecordDeclaration: 712var kind = isRecord ? SyntaxKind.RecordDeclaration : SyntaxKind.ClassDeclaration; 1539case SyntaxKind.RecordDeclaration: 2238case SyntaxKind.RecordDeclaration:
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (2)
234SyntaxKind.RecordDeclaration => DeclaredSymbolInfoKind.Record, 620case SyntaxKind.RecordDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (3)
36case SyntaxKind.RecordDeclaration: 75case SyntaxKind.RecordDeclaration: 97case SyntaxKind.RecordDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
31case SyntaxKind.RecordDeclaration: 158case SyntaxKind.RecordDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (3)
31{ SyntaxKind.RecordDeclaration, 14 }, 139case SyntaxKind.RecordDeclaration: 352else if (node.Kind() is SyntaxKind.StructDeclaration or SyntaxKind.ClassDeclaration or SyntaxKind.RecordDeclaration or SyntaxKind.RecordStructDeclaration)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
173case SyntaxKind.RecordDeclaration: 199var declarationKind = isRecordClass ? SyntaxKind.RecordDeclaration : SyntaxKind.RecordStructDeclaration;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
231targetToken.Parent.Parent is (kind: SyntaxKind.ClassDeclaration or SyntaxKind.RecordDeclaration);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (5)
73SyntaxKind.RecordDeclaration, 83SyntaxKind.RecordDeclaration, 92SyntaxKind.RecordDeclaration, 98SyntaxKind.RecordDeclaration, 104SyntaxKind.RecordDeclaration,
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
549kind == SyntaxKind.RecordDeclaration;
Microsoft.Extensions.Options.SourceGeneration (2)
Parser.cs (2)
165kind == SyntaxKind.RecordDeclaration; 181SyntaxKind.RecordDeclaration => "record class",
Microsoft.Gen.Logging (1)
Parsing\Parser.cs (1)
335kind == SyntaxKind.RecordDeclaration;
Microsoft.Gen.Metrics (1)
Parser.cs (1)
152SyntaxKind.RecordDeclaration;
Microsoft.Gen.MetricsReports (1)
src\Generators\Microsoft.Gen.Metrics\Parser.cs (1)
152SyntaxKind.RecordDeclaration;
Microsoft.VisualStudio.LanguageServices.CSharp (5)
CodeModel\CSharpCodeModelService.cs (1)
94case SyntaxKind.RecordDeclaration:
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
44case SyntaxKind.RecordDeclaration: 95case SyntaxKind.RecordDeclaration:
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (1)
172case SyntaxKind.RecordDeclaration:
Progression\CSharpProgressionLanguageService.cs (1)
64SyntaxKind.RecordDeclaration or
System.Text.Json.SourceGeneration (1)
Helpers\RoslynExtensions.cs (1)
268case SyntaxKind.RecordDeclaration:
System.Text.RegularExpressions.Generator (1)
RegexGenerator.Parser.cs (1)
246SyntaxKind.RecordDeclaration or