72 references to StructDeclarationSyntax
Microsoft.CodeAnalysis.CSharp (9)
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
809public override Binder VisitStructDeclaration(StructDeclarationSyntax node)
Declarations\DeclarationTreeBuilder.cs (2)
661public override SingleNamespaceOrTypeDeclaration VisitStructDeclaration(StructDeclarationSyntax node) 700var hasPrimaryCtor = node.ParameterList != null && node is RecordDeclarationSyntax or ClassDeclarationSyntax or StructDeclarationSyntax;
Syntax\StructDeclarationSyntax.cs (1)
9public StructDeclarationSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxToken openBraceToken, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken)
Syntax\SyntaxFactory.cs (5)
2884public static StructDeclarationSyntax StructDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxToken openBraceToken, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken) 2893public static StructDeclarationSyntax StructDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxList<MemberDeclarationSyntax> members) 2899public static StructDeclarationSyntax StructDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, ParameterListSyntax? parameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxList<MemberDeclarationSyntax> members) 2903public static StructDeclarationSyntax StructDeclaration(SyntaxToken identifier) 2907public static StructDeclarationSyntax StructDeclaration(string identifier)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
53c => c.DeclaringSyntaxReferences.FirstOrDefault()?.GetSyntax() is RecordDeclarationSyntax or ClassDeclarationSyntax or StructDeclarationSyntax);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1096case StructDeclarationSyntax @struct:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (2)
45if (root.FindNode(span).GetAncestor<TypeDeclarationSyntax>() is not StructDeclarationSyntax structDeclaration) 65StructDeclarationSyntax structDeclaration,
src\Analyzers\CSharp\CodeFixes\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableCodeFixProvider.cs (1)
44if (diagnosticNode is not StructDeclarationSyntax structDeclaration)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
277public override SyntaxNode VisitStructDeclaration(StructDeclarationSyntax node)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Semantics\PrimaryConstructorTests.cs (5)
5343var record = (StructDeclarationSyntax)context.Node; 5848case StructDeclarationSyntax { Identifier: { ValueText: "A" } }: 5940case StructDeclarationSyntax { Identifier: { ValueText: "A" } }: 5998case StructDeclarationSyntax { Identifier: { ValueText: "A" } }:
Microsoft.CodeAnalysis.CSharp.Features (15)
CodeLens\CSharpCodeLensMemberFinder.cs (1)
71public override void VisitStructDeclaration(StructDeclarationSyntax node)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.CallSiteContainerRewriter.cs (1)
396public override SyntaxNode VisitStructDeclaration(StructDeclarationSyntax node)
Organizing\Organizers\StructDeclarationOrganizer.cs (3)
17internal class StructDeclarationOrganizer : AbstractSyntaxNodeOrganizer<StructDeclarationSyntax> 25protected override StructDeclarationSyntax Organize( 26StructDeclarationSyntax syntax,
Snippets\CSharpPropgSnippetProvider.cs (1)
38if (syntaxContext.ContainingTypeDeclaration is StructDeclarationSyntax structDeclaration &&
Snippets\CSharpProprSnippetProvider.cs (1)
57if (syntaxContext.ContainingTypeDeclaration is StructDeclarationSyntax structDeclaration &&
Snippets\CSharpPropSnippetProvider.cs (1)
30if (syntaxContext.ContainingTypeDeclaration is StructDeclarationSyntax structDeclaration &&
Snippets\CSharpStructSnippetProvider.cs (3)
23internal sealed class CSharpStructSnippetProvider() : AbstractCSharpTypeSnippetProvider<StructDeclarationSyntax> 43protected override async Task<StructDeclarationSyntax> GenerateTypeDeclarationAsync(Document document, int position, CancellationToken cancellationToken) 49return (StructDeclarationSyntax)generator.StructDeclaration(name);
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (2)
45if (root.FindNode(span).GetAncestor<TypeDeclarationSyntax>() is not StructDeclarationSyntax structDeclaration) 65StructDeclarationSyntax structDeclaration,
src\Analyzers\CSharp\CodeFixes\MakeStructFieldsWritable\CSharpMakeStructFieldsWritableCodeFixProvider.cs (1)
44if (diagnosticNode is not StructDeclarationSyntax structDeclaration)
Structure\CSharpBlockStructureProvider.cs (1)
49builder.Add<StructDeclarationSyntax, TypeDeclarationStructureProvider>();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (4)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (4)
1492var structDecl = (StructDeclarationSyntax)cu.Members[2]; 4767var structDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<StructDeclarationSyntax>().First();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (9)
Generated\Syntax.Test.xml.Generated.cs (5)
10721private static StructDeclarationSyntax GenerateStructDeclaration() 13000var node = GenerateStructDeclaration(); 13014var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithKeyword(node.Keyword).WithIdentifier(node.Identifier).WithTypeParameterList(node.TypeParameterList).WithParameterList(node.ParameterList).WithBaseList(node.BaseList).WithConstraintClauses(node.ConstraintClauses).WithOpenBraceToken(node.OpenBraceToken).WithMembers(node.Members).WithCloseBraceToken(node.CloseBraceToken).WithSemicolonToken(node.SemicolonToken); 18363var oldNode = GenerateStructDeclaration(); 18379var oldNode = GenerateStructDeclaration();
Parsing\ParsingErrorRecoveryTests.cs (4)
7979var structDecl = root.DescendantNodes().OfType<StructDeclarationSyntax>().Single(); 8002var structDecl = root.DescendantNodes().OfType<StructDeclarationSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
53c => c.DeclaringSyntaxReferences.FirstOrDefault()?.GetSyntax() is RecordDeclarationSyntax or ClassDeclarationSyntax or StructDeclarationSyntax);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1096case StructDeclarationSyntax @struct:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (1)
277public override SyntaxNode VisitStructDeclaration(StructDeclarationSyntax node)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (13)
CodeGeneration\SyntaxGeneratorTests.cs (13)
1573VerifySyntax<StructDeclarationSyntax>( 1577VerifySyntax<StructDeclarationSyntax>( 1581VerifySyntax<StructDeclarationSyntax>( 1585VerifySyntax<StructDeclarationSyntax>( 1589VerifySyntax<StructDeclarationSyntax>( 1593VerifySyntax<StructDeclarationSyntax>( 1597VerifySyntax<StructDeclarationSyntax>( 1601VerifySyntax<StructDeclarationSyntax>( 1898VerifySyntax<StructDeclarationSyntax>( 2028VerifySyntax<StructDeclarationSyntax>( 2127VerifySyntax<StructDeclarationSyntax>( 4023VerifySyntax<StructDeclarationSyntax>( 4911VerifySyntax<StructDeclarationSyntax>(
Microsoft.Extensions.Options.SourceGeneration (1)
TypeDeclarationSyntaxReceiver.cs (1)
29else if (syntaxNode is StructDeclarationSyntax structSyntax)
Microsoft.Gen.ComplianceReports (1)
src\Generators\Shared\TypeDeclarationSyntaxReceiver.cs (1)
34else if (syntaxNode is StructDeclarationSyntax structSyntax)
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
EmitterTests.cs (1)
38syntaxTree.GetRoot().DescendantNodes().OfType<StructDeclarationSyntax>().Single().Members.Single().Modifiers,
Microsoft.Gen.Logging (1)
src\Generators\Shared\TypeDeclarationSyntaxReceiver.cs (1)
34else if (syntaxNode is StructDeclarationSyntax structSyntax)
Microsoft.Gen.Metrics (1)
src\Generators\Shared\TypeDeclarationSyntaxReceiver.cs (1)
34else if (syntaxNode is StructDeclarationSyntax structSyntax)
Microsoft.ML.InternalCodeAnalyzer (1)
NameAnalyzer.cs (1)
126CheckPascal(((StructDeclarationSyntax)context.Node).Identifier, context);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.cs (2)
946return ((StructDeclarationSyntax)typeNode).WithIdentifier(newIdentifier); 3374else if (container is StructDeclarationSyntax structDeclaration)