127 references to GetAccessorDeclaration
Microsoft.CodeAnalysis.CSharp (21)
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
286accessor = (parent.Kind() == SyntaxKind.GetAccessorDeclaration) ? propertySymbol.GetMethod : propertySymbol.SetMethod;
Compilation\MemberSemanticModel.cs (1)
2139case SyntaxKind.GetAccessorDeclaration:
Compilation\MethodBodySemanticModel.cs (1)
96case SyntaxKind.GetAccessorDeclaration:
Compilation\SyntaxTreeSemanticModel.cs (3)
786case SyntaxKind.GetAccessorDeclaration: 885case SyntaxKind.GetAccessorDeclaration: 1099case SyntaxKind.GetAccessorDeclaration:
CSharpDeclarationComputer.cs (1)
257case SyntaxKind.GetAccessorDeclaration:
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (2)
579case SyntaxKind.GetAccessorDeclaration: 605case SyntaxKind.GetAccessorDeclaration:
Parser\LanguageParser.cs (2)
4104SyntaxKind.GetKeyword => SyntaxKind.GetAccessorDeclaration, 4812case SyntaxKind.GetAccessorDeclaration:
Symbols\Source\SourceCustomEventSymbol.cs (1)
109case SyntaxKind.GetAccessorDeclaration:
Symbols\Source\SourcePropertyAccessorSymbol.cs (4)
37Debug.Assert(syntax.Kind() == SyntaxKind.GetAccessorDeclaration || 41bool isGetMethod = (syntax.Kind() == SyntaxKind.GetAccessorDeclaration); 638case SyntaxKind.GetAccessorDeclaration: 709case SyntaxKind.GetAccessorDeclaration:
Symbols\Source\SourcePropertySymbol.cs (2)
187case SyntaxKind.GetAccessorDeclaration: 244case SyntaxKind.GetAccessorDeclaration:
Syntax\SyntaxExtensions.cs (1)
38case SyntaxKind.GetAccessorDeclaration:
Syntax\SyntaxKindFacts.cs (2)
741return SyntaxKind.GetAccessorDeclaration; 759case SyntaxKind.GetAccessorDeclaration:
Microsoft.CodeAnalysis.CSharp.CodeStyle (12)
BlockSyntaxExtensions.cs (2)
68if (parent.Kind() == SyntaxKind.GetAccessorDeclaration) 94case SyntaxKind.GetAccessorDeclaration:
CSharpAccessibilityFacts.cs (2)
41case SyntaxKind.GetAccessorDeclaration: 294case SyntaxKind.GetAccessorDeclaration:
CSharpSyntaxFacts.cs (1)
1270case SyntaxKind.GetAccessorDeclaration:
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
95AccessorDeclarationSyntax(SyntaxKind.GetAccessorDeclaration) { Parent: AccessorListSyntax { Parent: BasePropertyDeclarationSyntax baseProperty } } accessor => baseProperty.Type,
FormattingRangeHelper.cs (1)
373SyntaxKind.GetAccessorDeclaration or
SyntaxNodeExtensions.cs (1)
513case SyntaxKind.GetAccessorDeclaration:
UseExpressionBodyForAccessorsHelper.cs (2)
25ImmutableArray.Create(SyntaxKind.GetAccessorDeclaration, SyntaxKind.SetAccessorDeclaration, SyntaxKind.InitAccessorDeclaration, SyntaxKind.AddAccessorDeclaration, SyntaxKind.RemoveAccessorDeclaration)) 51=> declaration.IsKind(SyntaxKind.GetAccessorDeclaration);
UseExpressionBodyHelper`1.cs (2)
52return accessorList is { Accessors: [{ AttributeLists.Count: 0, RawKind: (int)SyntaxKind.GetAccessorDeclaration } accessor] } 296var accessor = SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
PropertyGenerator.cs (2)
162if (accessor.IsKind(SyntaxKind.GetAccessorDeclaration)) 263GenerateAccessorDeclaration(property, property.GetMethod, SyntaxKind.GetAccessorDeclaration, destination, info),
Microsoft.CodeAnalysis.CSharp.Features (26)
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (2)
74=> (accessorListSyntax.Accessors.FirstOrDefault(a => a.IsKind(SyntaxKind.GetAccessorDeclaration)), 128propertyDeclaration.AccessorList.Accessors[0].Kind() == SyntaxKind.GetAccessorDeclaration)
CSharpDeclarationComputer.cs (1)
257case SyntaxKind.GetAccessorDeclaration:
CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
95AccessorDeclarationSyntax(SyntaxKind.GetAccessorDeclaration) { Parent: AccessorListSyntax { Parent: BasePropertyDeclarationSyntax baseProperty } } accessor => baseProperty.Type,
EditAndContinue\BreakpointSpans.cs (1)
208case SyntaxKind.GetAccessorDeclaration:
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (4)
97case SyntaxKind.GetAccessorDeclaration: 1375if (node.IsKind(SyntaxKind.GetAccessorDeclaration)) 1680case SyntaxKind.GetAccessorDeclaration: 2043case SyntaxKind.GetAccessorDeclaration:
EditAndContinue\SyntaxComparer.cs (3)
639case SyntaxKind.GetAccessorDeclaration: 708case SyntaxKind.GetAccessorDeclaration: 1467case SyntaxKind.GetAccessorDeclaration:
EditAndContinue\SyntaxUtilities.cs (2)
45case SyntaxKind.GetAccessorDeclaration: 217var firstGetter = accessorList?.Accessors.Where(a => a.IsKind(SyntaxKind.GetAccessorDeclaration)).FirstOrDefault();
GenerateConstructorFromMembers\CSharpGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
69var getAccessor = propertyDeclaration.AccessorList?.Accessors.FirstOrDefault(a => a.Kind() == SyntaxKind.GetAccessorDeclaration);
InitializeParameter\CSharpInitializeMemberFromParameterCodeRefactoringProvider.cs (1)
81.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration)
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
254SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration, body)));
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (4)
71if (propertyDeclaration.AccessorList is { Accessors: [(kind: SyntaxKind.GetAccessorDeclaration) getAccessor] }) 99SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration) 192createReturnStatementForExpression: accessorDeclaration.Kind() == SyntaxKind.GetAccessorDeclaration, 209var accessor = SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration);
UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
167var getter = SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration)
UseExpressionBodyForAccessorsHelper.cs (2)
25ImmutableArray.Create(SyntaxKind.GetAccessorDeclaration, SyntaxKind.SetAccessorDeclaration, SyntaxKind.InitAccessorDeclaration, SyntaxKind.AddAccessorDeclaration, SyntaxKind.RemoveAccessorDeclaration)) 51=> declaration.IsKind(SyntaxKind.GetAccessorDeclaration);
UseExpressionBodyHelper`1.cs (2)
52return accessorList is { Accessors: [{ AttributeLists.Count: 0, RawKind: (int)SyntaxKind.GetAccessorDeclaration } accessor] } 296var accessor = SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\GeneratorDriverTests_Attributes_FullyQualifiedName.cs (1)
758step => Assert.True(step.Outputs.Single().Value is AccessorDeclarationSyntax { RawKind: (int)SyntaxKind.GetAccessorDeclaration }));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (35)
Generated\Syntax.Test.xml.Generated.cs (2)
578=> InternalSyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration, new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.SyntaxToken>(), InternalSyntaxFactory.Token(SyntaxKind.GetKeyword), null, null, null); 10554=> SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration, new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.GetKeyword), default(BlockSyntax), default(ArrowExpressionClauseSyntax), default(SyntaxToken));
IncrementalParsing\TypeChanges.cs (1)
110Assert.Equal(SyntaxKind.GetAccessorDeclaration, propertyType.AccessorList.Accessors[0].Kind());
Parsing\AsyncParsingTests.cs (4)
994N(SyntaxKind.GetAccessorDeclaration); 1040N(SyntaxKind.GetAccessorDeclaration); 2460N(SyntaxKind.GetAccessorDeclaration); 2576N(SyntaxKind.GetAccessorDeclaration);
Parsing\DeclarationParsingTests.cs (2)
4471TestClassPropertyWithValue(SyntaxKind.GetAccessorDeclaration, SyntaxKind.GetKeyword, SyntaxKind.IdentifierToken); 6296N(SyntaxKind.GetAccessorDeclaration);
Parsing\FileModifierParsingTests.cs (2)
976N(SyntaxKind.GetAccessorDeclaration); 1120N(SyntaxKind.GetAccessorDeclaration);
Parsing\MemberDeclarationParsingTests.cs (7)
1071N(SyntaxKind.GetAccessorDeclaration); 1220N(SyntaxKind.GetAccessorDeclaration); 1246N(SyntaxKind.GetAccessorDeclaration); 1294N(SyntaxKind.GetAccessorDeclaration); 1362N(SyntaxKind.GetAccessorDeclaration); 1734N(SyntaxKind.GetAccessorDeclaration); 10413N(SyntaxKind.GetAccessorDeclaration);
Parsing\ParsingErrorRecoveryTests.cs (3)
5660Assert.Equal(SyntaxKind.GetAccessorDeclaration, acc.Kind()); 5695Assert.Equal(SyntaxKind.GetAccessorDeclaration, acc.Kind()); 5734Assert.Equal(SyntaxKind.GetAccessorDeclaration, acc.Kind());
Parsing\RefFieldParsingTests.cs (1)
312N(SyntaxKind.GetAccessorDeclaration);
Parsing\ScriptParsingTests.cs (12)
835N(SyntaxKind.GetAccessorDeclaration); 891N(SyntaxKind.GetAccessorDeclaration); 940N(SyntaxKind.GetAccessorDeclaration); 1302N(SyntaxKind.GetAccessorDeclaration); 1635N(SyntaxKind.GetAccessorDeclaration); 1682N(SyntaxKind.GetAccessorDeclaration); 1785N(SyntaxKind.GetAccessorDeclaration); 1804N(SyntaxKind.GetAccessorDeclaration); 2075N(SyntaxKind.GetAccessorDeclaration); 2094N(SyntaxKind.GetAccessorDeclaration); 2125N(SyntaxKind.GetAccessorDeclaration); 2153N(SyntaxKind.GetAccessorDeclaration);
Parsing\TopLevelStatementsParsingTests.cs (1)
864N(SyntaxKind.GetAccessorDeclaration);
Microsoft.CodeAnalysis.CSharp.Workspaces (18)
BlockSyntaxExtensions.cs (2)
68if (parent.Kind() == SyntaxKind.GetAccessorDeclaration) 94case SyntaxKind.GetAccessorDeclaration:
CodeGeneration\CSharpSyntaxGenerator.cs (9)
363getAccessor = AccessorDeclaration(SyntaxKind.GetAccessorDeclaration, modifiers.IsAbstract ? null : getAccessorStatements); 398=> AccessorDeclaration(SyntaxKind.GetAccessorDeclaration, accessibility, statements); 471accessors.Add(AccessorDeclaration(SyntaxKind.GetAccessorDeclaration, getAccessorStatements)); 1577case SyntaxKind.GetAccessorDeclaration: 2487case SyntaxKind.GetAccessorDeclaration: 2523case SyntaxKind.GetAccessorDeclaration: 2593case SyntaxKind.GetAccessorDeclaration: 2642var accessor = GetAccessor(declaration, SyntaxKind.GetAccessorDeclaration); 2653=> this.WithAccessorStatements(declaration, SyntaxKind.GetAccessorDeclaration, statements);
CSharpAccessibilityFacts.cs (2)
41case SyntaxKind.GetAccessorDeclaration: 294case SyntaxKind.GetAccessorDeclaration:
CSharpSyntaxFacts.cs (1)
1270case SyntaxKind.GetAccessorDeclaration:
FormattingRangeHelper.cs (1)
373SyntaxKind.GetAccessorDeclaration or
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs\SyntaxNodeExtensions.cs (1)
513case SyntaxKind.GetAccessorDeclaration:
PropertyGenerator.cs (2)
162if (accessor.IsKind(SyntaxKind.GetAccessorDeclaration)) 263GenerateAccessorDeclaration(property, property.GetMethod, SyntaxKind.GetAccessorDeclaration, destination, info),
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\SyntaxGeneratorTests.cs (3)
1364SyntaxKind.GetAccessorDeclaration) 1423SyntaxKind.GetAccessorDeclaration) 2990Generator.GetModifiers(Generator.WithModifiers(SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration), allModifiers)));
Formatting\FormattingTests.cs (1)
4518SyntaxKind.GetAccessorDeclaration,
Microsoft.VisualStudio.LanguageServices.CSharp (8)
CodeModel\CSharpCodeModelService.cs (6)
161case SyntaxKind.GetAccessorDeclaration: 1484case SyntaxKind.GetAccessorDeclaration: 1497SyntaxKind.GetAccessorDeclaration => MethodKind.PropertyGet, 1507MethodKind.PropertyGet => SyntaxKind.GetAccessorDeclaration, 2689var hasGetter = property.AccessorList != null && property.AccessorList.Accessors.Any(SyntaxKind.GetAccessorDeclaration); 3564case SyntaxKind.GetAccessorDeclaration:
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
61case SyntaxKind.GetAccessorDeclaration: 112case SyntaxKind.GetAccessorDeclaration: