156 references to GetAccessorDeclaration
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentParameterAnalyzer.cs (1)
163if (!getterAccessor.IsKind(SyntaxKind.GetAccessorDeclaration) || !setterAccessor.IsKind(SyntaxKind.SetAccessorDeclaration))
Microsoft.CodeAnalysis.CSharp (21)
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
292accessor = (parent.Kind() == SyntaxKind.GetAccessorDeclaration) ? propertySymbol.GetMethod : propertySymbol.SetMethod;
Compilation\MemberSemanticModel.cs (1)
2166case SyntaxKind.GetAccessorDeclaration:
Compilation\MethodBodySemanticModel.cs (1)
93case SyntaxKind.GetAccessorDeclaration:
Compilation\SyntaxTreeSemanticModel.cs (3)
790case SyntaxKind.GetAccessorDeclaration: 889case SyntaxKind.GetAccessorDeclaration: 1103case SyntaxKind.GetAccessorDeclaration:
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (2)
579case SyntaxKind.GetAccessorDeclaration: 605case SyntaxKind.GetAccessorDeclaration:
Parser\LanguageParser.cs (2)
4478SyntaxKind.GetKeyword => SyntaxKind.GetAccessorDeclaration, 5090case SyntaxKind.GetAccessorDeclaration:
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
257case SyntaxKind.GetAccessorDeclaration:
Symbols\Source\SourceCustomEventSymbol.cs (1)
109case SyntaxKind.GetAccessorDeclaration:
Symbols\Source\SourcePropertyAccessorSymbol.cs (4)
36Debug.Assert(syntax.Kind() == SyntaxKind.GetAccessorDeclaration || 40bool isGetMethod = (syntax.Kind() == SyntaxKind.GetAccessorDeclaration); 660case SyntaxKind.GetAccessorDeclaration: 732case SyntaxKind.GetAccessorDeclaration:
Symbols\Source\SourcePropertySymbol.cs (2)
241case SyntaxKind.GetAccessorDeclaration: 335case SyntaxKind.GetAccessorDeclaration:
Syntax\SyntaxExtensions.cs (1)
38case SyntaxKind.GetAccessorDeclaration:
Syntax\SyntaxKindFacts.cs (2)
769return SyntaxKind.GetAccessorDeclaration; 787case SyntaxKind.GetAccessorDeclaration:
Microsoft.CodeAnalysis.CSharp.CodeStyle (12)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForAccessorsHelper.cs (2)
26SyntaxKind.GetAccessorDeclaration, 57=> declaration.IsKind(SyntaxKind.GetAccessorDeclaration);
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (2)
55return accessorList is { Accessors: [{ AttributeLists.Count: 0, RawKind: (int)SyntaxKind.GetAccessorDeclaration } accessor] } 301var accessor = AccessorDeclaration(SyntaxKind.GetAccessorDeclaration);
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
110AccessorDeclarationSyntax(SyntaxKind.GetAccessorDeclaration) { Parent: AccessorListSyntax { Parent: BasePropertyDeclarationSyntax baseProperty } } => baseProperty.Type,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (2)
135if (parent.Kind() == SyntaxKind.GetAccessorDeclaration) 161case SyntaxKind.GetAccessorDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
435case SyntaxKind.GetAccessorDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
41case SyntaxKind.GetAccessorDeclaration: 294case SyntaxKind.GetAccessorDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1276case SyntaxKind.GetAccessorDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
373SyntaxKind.GetAccessorDeclaration or
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (2)
166if (accessor.IsKind(SyntaxKind.GetAccessorDeclaration)) 267GenerateAccessorDeclaration(property, property.GetMethod, SyntaxKind.GetAccessorDeclaration, destination, info, cancellationToken),
Microsoft.CodeAnalysis.CSharp.Features (22)
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (2)
75=> (accessorListSyntax.Accessors.FirstOrDefault(a => a.IsKind(SyntaxKind.GetAccessorDeclaration)), 128propertyDeclaration.AccessorList.Accessors[0].Kind() == SyntaxKind.GetAccessorDeclaration)
EditAndContinue\BreakpointSpans.cs (1)
314case SyntaxKind.GetAccessorDeclaration:
EditAndContinue\SyntaxComparer.cs (3)
648case SyntaxKind.GetAccessorDeclaration: 717case SyntaxKind.GetAccessorDeclaration: 1476case SyntaxKind.GetAccessorDeclaration:
EditAndContinue\SyntaxUtilities.cs (1)
161var firstGetter = accessorList?.Accessors.Where(a => a.IsKind(SyntaxKind.GetAccessorDeclaration)).FirstOrDefault();
GenerateConstructorFromMembers\CSharpGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
65var getAccessor = propertyDeclaration.AccessorList?.Accessors.FirstOrDefault(a => a.Kind() == SyntaxKind.GetAccessorDeclaration);
InitializeParameter\InitializeParameterHelpers.cs (1)
171.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration)
IntroduceVariable\CSharpIntroduceVariableService_IntroduceLocal.cs (1)
257[AccessorDeclaration(SyntaxKind.GetAccessorDeclaration, body)]);
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (4)
74if (propertyDeclaration.AccessorList is { Accessors: [(kind: SyntaxKind.GetAccessorDeclaration) getAccessor] }) 102AccessorDeclaration(SyntaxKind.GetAccessorDeclaration) 196createReturnStatementForExpression: accessorDeclaration.Kind() == SyntaxKind.GetAccessorDeclaration, 213var accessor = AccessorDeclaration(SyntaxKind.GetAccessorDeclaration);
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForAccessorsHelper.cs (2)
26SyntaxKind.GetAccessorDeclaration, 57=> declaration.IsKind(SyntaxKind.GetAccessorDeclaration);
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (2)
55return accessorList is { Accessors: [{ AttributeLists.Count: 0, RawKind: (int)SyntaxKind.GetAccessorDeclaration } accessor] } 301var accessor = AccessorDeclaration(SyntaxKind.GetAccessorDeclaration);
src\Analyzers\CSharp\Analyzers\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationDiagnosticAnalyzer.cs (1)
110AccessorDeclarationSyntax(SyntaxKind.GetAccessorDeclaration) { Parent: AccessorListSyntax { Parent: BasePropertyDeclarationSyntax baseProperty } } => baseProperty.Type,
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
257case SyntaxKind.GetAccessorDeclaration:
UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (2)
193AccessorDeclaration(SyntaxKind.GetAccessorDeclaration) 202(isTrivialGetAccessor && accessor.Kind() is 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 (66)
Generated\Syntax.Test.xml.Generated.cs (2)
596=> 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); 10812=> 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); 2449N(SyntaxKind.GetAccessorDeclaration); 2565N(SyntaxKind.GetAccessorDeclaration);
Parsing\DeclarationParsingTests.cs (2)
4471TestClassPropertyWithValue(SyntaxKind.GetAccessorDeclaration, SyntaxKind.GetKeyword, SyntaxKind.IdentifierToken); 6296N(SyntaxKind.GetAccessorDeclaration);
Parsing\DeclarationParsingTests_MissingIdentifiers.cs (20)
70N(SyntaxKind.GetAccessorDeclaration); 94N(SyntaxKind.GetAccessorDeclaration); 211N(SyntaxKind.GetAccessorDeclaration); 406N(SyntaxKind.GetAccessorDeclaration); 627N(SyntaxKind.GetAccessorDeclaration); 917N(SyntaxKind.GetAccessorDeclaration); 1128N(SyntaxKind.GetAccessorDeclaration); 1299N(SyntaxKind.GetAccessorDeclaration); 1433N(SyntaxKind.GetAccessorDeclaration); 1637N(SyntaxKind.GetAccessorDeclaration); 2002N(SyntaxKind.GetAccessorDeclaration); 2026N(SyntaxKind.GetAccessorDeclaration); 2143N(SyntaxKind.GetAccessorDeclaration); 2338N(SyntaxKind.GetAccessorDeclaration); 2562N(SyntaxKind.GetAccessorDeclaration); 2795N(SyntaxKind.GetAccessorDeclaration); 3006N(SyntaxKind.GetAccessorDeclaration); 3323N(SyntaxKind.GetAccessorDeclaration); 3662N(SyntaxKind.GetAccessorDeclaration); 3966N(SyntaxKind.GetAccessorDeclaration);
Parsing\FieldKeywordParsingTests.cs (6)
82N(SyntaxKind.GetAccessorDeclaration); 184N(SyntaxKind.GetAccessorDeclaration); 235N(SyntaxKind.GetAccessorDeclaration); 424N(SyntaxKind.GetAccessorDeclaration); 490N(SyntaxKind.GetAccessorDeclaration); 2172N(SyntaxKind.GetAccessorDeclaration);
Parsing\FileModifierParsingTests.cs (2)
976N(SyntaxKind.GetAccessorDeclaration); 1120N(SyntaxKind.GetAccessorDeclaration);
Parsing\MemberDeclarationParsingTests.cs (12)
1065N(SyntaxKind.GetAccessorDeclaration); 1214N(SyntaxKind.GetAccessorDeclaration); 1240N(SyntaxKind.GetAccessorDeclaration); 1288N(SyntaxKind.GetAccessorDeclaration); 1356N(SyntaxKind.GetAccessorDeclaration); 1728N(SyntaxKind.GetAccessorDeclaration); 10402N(SyntaxKind.GetAccessorDeclaration); 17139N(SyntaxKind.GetAccessorDeclaration); 17260N(SyntaxKind.GetAccessorDeclaration); 17333N(SyntaxKind.GetAccessorDeclaration); 18771N(SyntaxKind.GetAccessorDeclaration); 18867N(SyntaxKind.GetAccessorDeclaration);
Parsing\ParsingErrorRecoveryTests.cs (3)
6464Assert.Equal(SyntaxKind.GetAccessorDeclaration, acc.Kind()); 6499Assert.Equal(SyntaxKind.GetAccessorDeclaration, acc.Kind()); 6538Assert.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)
CodeGeneration\CSharpSyntaxGenerator.cs (9)
388getAccessor = AccessorDeclaration(SyntaxKind.GetAccessorDeclaration, modifiers.IsAbstract ? null : getAccessorStatements); 423=> AccessorDeclaration(SyntaxKind.GetAccessorDeclaration, accessibility, statements); 492accessors.Add(AccessorDeclaration(SyntaxKind.GetAccessorDeclaration, getAccessorStatements)); 1583case SyntaxKind.GetAccessorDeclaration: 2491SyntaxKind.GetAccessorDeclaration or 2526case SyntaxKind.GetAccessorDeclaration: 2593case SyntaxKind.GetAccessorDeclaration: 2642var accessor = GetAccessor(declaration, SyntaxKind.GetAccessorDeclaration); 2653=> this.WithAccessorStatements(declaration, SyntaxKind.GetAccessorDeclaration, statements);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (2)
135if (parent.Kind() == SyntaxKind.GetAccessorDeclaration) 161case SyntaxKind.GetAccessorDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
435case SyntaxKind.GetAccessorDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (2)
41case SyntaxKind.GetAccessorDeclaration: 294case SyntaxKind.GetAccessorDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (1)
1276case SyntaxKind.GetAccessorDeclaration:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
373SyntaxKind.GetAccessorDeclaration or
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (2)
166if (accessor.IsKind(SyntaxKind.GetAccessorDeclaration)) 267GenerateAccessorDeclaration(property, property.GetMethod, SyntaxKind.GetAccessorDeclaration, destination, info, cancellationToken),
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\SyntaxGeneratorTests.cs (3)
1368SyntaxKind.GetAccessorDeclaration) 1425SyntaxKind.GetAccessorDeclaration) 3094Generator.GetModifiers(Generator.WithModifiers(AccessorDeclaration(SyntaxKind.GetAccessorDeclaration), allModifiers)));
Formatting\FormattingTests.cs (1)
4647SyntaxKind.GetAccessorDeclaration,
Microsoft.Interop.ComInterfaceGenerator (1)
ComInterfaceGenerator.cs (1)
642AccessorDeclaration(SyntaxKind.GetAccessorDeclaration).WithSemicolonToken(Token(SyntaxKind.SemicolonToken)))
Microsoft.VisualStudio.LanguageServices.CSharp (8)
CodeModel\CSharpCodeModelService.cs (6)
162case SyntaxKind.GetAccessorDeclaration: 1481case SyntaxKind.GetAccessorDeclaration: 1494SyntaxKind.GetAccessorDeclaration => MethodKind.PropertyGet, 1504MethodKind.PropertyGet => SyntaxKind.GetAccessorDeclaration, 2685var hasGetter = property.AccessorList != null && property.AccessorList.Accessors.Any(SyntaxKind.GetAccessorDeclaration); 3559case SyntaxKind.GetAccessorDeclaration:
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
60case SyntaxKind.GetAccessorDeclaration: 111case SyntaxKind.GetAccessorDeclaration: