233 references to IndexerDeclarationSyntax
Microsoft.CodeAnalysis.CSharp (29)
Binder\Binder_Statements.cs (1)
3552
IndexerDeclarationSyntax
=> MessageID.IDS_FeatureExpressionBodiedIndexer,
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
398
public override Binder VisitIndexerDeclaration(
IndexerDeclarationSyntax
parent)
Compilation\CSharpSemanticModel.cs (1)
3032
public abstract IPropertySymbol GetDeclaredSymbol(
IndexerDeclarationSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
Compilation\MemberSemanticModel.cs (1)
656
public override IPropertySymbol GetDeclaredSymbol(
IndexerDeclarationSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\PublicSemanticModel.cs (1)
42
IndexerDeclarationSyntax
or
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
310
public override IPropertySymbol GetDeclaredSymbol(
IndexerDeclarationSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Compilation\SyntaxTreeSemanticModel.cs (5)
903
var
indexerDecl = (
IndexerDeclarationSyntax
)memberDecl;
1541
public override IPropertySymbol GetDeclaredSymbol(
IndexerDeclarationSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
1640
var
indexerDecl = (
IndexerDeclarationSyntax
)declaration;
CSharpExtensions.cs (1)
1436
public static IPropertySymbol? GetDeclaredSymbol(this SemanticModel? semanticModel,
IndexerDeclarationSyntax
declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
Parser\LanguageParser.cs (1)
3942
private
IndexerDeclarationSyntax
ParseIndexerDeclaration(
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (3)
233
var
t = (
IndexerDeclarationSyntax
)node;
401
arrowExpr = ((
IndexerDeclarationSyntax
)node).ExpressionBody;
Symbols\Source\SourceMemberContainerSymbol.cs (2)
5140
var
indexerSyntax = (
IndexerDeclarationSyntax
)m;
Symbols\Source\SourcePropertySymbol.cs (3)
26
internal static SourcePropertySymbol Create(SourceMemberContainerTypeSymbol containingType, Binder bodyBinder,
IndexerDeclarationSyntax
syntax, BindingDiagnosticBag diagnostics)
184
IndexerDeclarationSyntax
i => i.ExpressionBody,
779
=> (syntax as
IndexerDeclarationSyntax
)?.ParameterList;
Symbols\Source\SourcePropertySymbolBase.cs (1)
459
var indexerNameAttributeLists = ((
IndexerDeclarationSyntax
)CSharpSyntaxNode).AttributeLists;
Syntax\IndexerDeclarationSyntax.cs (2)
25
public
IndexerDeclarationSyntax
WithSemicolon(SyntaxToken semicolon)
36
public static
IndexerDeclarationSyntax
IndexerDeclaration(
Syntax\LookupPosition.cs (1)
58
IndexerDeclarationSyntax
indexer)
Syntax\SyntaxExtensions.cs (3)
50
arrowExpr = ((
IndexerDeclarationSyntax
)node).ExpressionBody;
266
public static
IndexerDeclarationSyntax
Update(
267
this
IndexerDeclarationSyntax
syntax,
Syntax\SyntaxFacts.cs (1)
170
return ((
IndexerDeclarationSyntax
)parent).Type == node;
Microsoft.CodeAnalysis.CSharp.CodeStyle (25)
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
202
IndexerDeclarationSyntax
indexerDeclaration => indexerDeclaration.ThisKeyword,
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForIndexersHelper.cs (17)
19
UseExpressionBodyHelper<
IndexerDeclarationSyntax
>
36
protected override BlockSyntax GetBody(
IndexerDeclarationSyntax
declaration)
39
protected override ArrowExpressionClauseSyntax GetExpressionBody(
IndexerDeclarationSyntax
declaration)
42
protected override SyntaxToken GetSemicolonToken(
IndexerDeclarationSyntax
declaration)
45
protected override
IndexerDeclarationSyntax
WithSemicolonToken(
IndexerDeclarationSyntax
declaration, SyntaxToken token)
48
protected override
IndexerDeclarationSyntax
WithExpressionBody(
IndexerDeclarationSyntax
declaration, ArrowExpressionClauseSyntax expressionBody)
51
protected override
IndexerDeclarationSyntax
WithAccessorList(
IndexerDeclarationSyntax
declaration, AccessorListSyntax accessorList)
54
protected override
IndexerDeclarationSyntax
WithBody(
IndexerDeclarationSyntax
declaration, BlockSyntax body)
64
protected override
IndexerDeclarationSyntax
WithGenerateBody(SemanticModel semanticModel,
IndexerDeclarationSyntax
declaration)
67
protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel,
IndexerDeclarationSyntax
declaration) => true;
70
IndexerDeclarationSyntax
declaration,
79
protected override Location GetDiagnosticLocation(
IndexerDeclarationSyntax
declaration)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (4)
58
return ((
IndexerDeclarationSyntax
)member).ThisKeyword;
127
return ((
IndexerDeclarationSyntax
)member).WithParameterList((BracketedParameterListSyntax)parameterList);
153
return ((
IndexerDeclarationSyntax
)member).Type;
176
IndexerDeclarationSyntax
indexer => indexer.ExpressionBody,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
149
IndexerDeclarationSyntax
indexerDeclaration => indexerDeclaration.ParameterList,
349
case BaseMethodDeclarationSyntax or
IndexerDeclarationSyntax
or EventDeclarationSyntax:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
61
return ((
IndexerDeclarationSyntax
)declaration).ExplicitInterfaceSpecifier == null;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (18)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (2)
93
var
oldIndexer = node.Parent?.Parent as
IndexerDeclarationSyntax
;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
814
var
indexerDeclarationSyntax = (
IndexerDeclarationSyntax
)syntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (4)
127
return Compare((
IndexerDeclarationSyntax
)x, (
IndexerDeclarationSyntax
)y);
249
private static int Compare(
IndexerDeclarationSyntax
x,
IndexerDeclarationSyntax
y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (3)
97
var
declaration = IndexerDeclaration(
196
private static
IndexerDeclarationSyntax
UseExpressionBodyIfDesired(
197
CSharpCodeGenerationContextInfo info,
IndexerDeclarationSyntax
declaration, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BasePropertyDeclarationSyntaxExtensions.cs (6)
13
/// Available if <paramref name="node"/> is <see cref="PropertyDeclarationSyntax"/> or <see cref="
IndexerDeclarationSyntax
"/>.
22
case SyntaxKind.IndexerDeclaration: return ((
IndexerDeclarationSyntax
)node).SemicolonToken;
30
/// Available if <paramref name="node"/> is <see cref="PropertyDeclarationSyntax"/> or <see cref="
IndexerDeclarationSyntax
"/>.
40
case SyntaxKind.IndexerDeclaration: return ((
IndexerDeclarationSyntax
)node).WithSemicolonToken(semicolonToken);
48
/// Available if <paramref name="node"/> is <see cref="PropertyDeclarationSyntax"/> or <see cref="
IndexerDeclarationSyntax
"/>.
58
case SyntaxKind.IndexerDeclaration: return ((
IndexerDeclarationSyntax
)node).WithExpressionBody(expressionBody);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
523
targetToken.IsAccessorDeclarationContext<
IndexerDeclarationSyntax
>(position, kind);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
613
IndexerDeclarationSyntax
indexerNode => indexerNode.ParameterList.Span.End,
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (2)
471
IndexerDeclarationSyntax
indexerDeclarationNode => ShouldAddBraceForIndexerDeclaration(indexerDeclarationNode, caretPosition),
599
private static bool ShouldAddBraceForIndexerDeclaration(
IndexerDeclarationSyntax
indexerDeclarationNode, int caretPosition)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Structure\IndexerDeclarationStructureTests.cs (1)
15
public class IndexerDeclarationStructureTests : AbstractCSharpSyntaxNodeStructureTests<
IndexerDeclarationSyntax
>
Structure\MetadataAsSource\IndexerDeclarationStructureTests.cs (1)
14
public class IndexerDeclarationStructureTests : AbstractCSharpSyntaxNodeStructureTests<
IndexerDeclarationSyntax
>
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Diagnostics\GetDiagnosticsTests.cs (2)
992
if (operationBlock.Syntax is PropertyDeclarationSyntax or
IndexerDeclarationSyntax
)
1019
IndexerDeclarationSyntax
indexerDecl => indexerDecl.ThisKeyword.GetLocation(),
Microsoft.CodeAnalysis.CSharp.Features (53)
ChangeSignature\CSharpChangeSignatureService.cs (1)
342
if (updatedNode is
IndexerDeclarationSyntax
indexer)
Completion\CompletionProviders\OverrideCompletionProvider.cs (1)
39
?? token.GetAncestor<
IndexerDeclarationSyntax
>()
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (1)
59
?? token.GetAncestor<
IndexerDeclarationSyntax
>()
Completion\KeywordRecommenders\GetKeywordRecommender.cs (1)
22
context.TargetToken.IsAccessorDeclarationContext<
IndexerDeclarationSyntax
>(position, SyntaxKind.GetKeyword);
Completion\KeywordRecommenders\InitKeywordRecommender.cs (1)
22
context.TargetToken.IsAccessorDeclarationContext<
IndexerDeclarationSyntax
>(position, SyntaxKind.InitKeyword);
Completion\KeywordRecommenders\InternalKeywordRecommender.cs (1)
31
context.TargetToken.IsAccessorDeclarationContext<
IndexerDeclarationSyntax
>(context.Position))
Completion\KeywordRecommenders\PrivateKeywordRecommender.cs (1)
32
context.TargetToken.IsAccessorDeclarationContext<
IndexerDeclarationSyntax
>(context.Position))
Completion\KeywordRecommenders\ProtectedKeywordRecommender.cs (1)
30
context.TargetToken.IsAccessorDeclarationContext<
IndexerDeclarationSyntax
>(context.Position))
Completion\KeywordRecommenders\SetKeywordRecommender.cs (1)
22
context.TargetToken.IsAccessorDeclarationContext<
IndexerDeclarationSyntax
>(position, SyntaxKind.SetKeyword);
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
136
block.Parent.Parent.Parent is
IndexerDeclarationSyntax
indexerDeclaration)
EditAndContinue\BreakpointSpans.cs (2)
360
var
indexer = (
IndexerDeclarationSyntax
)node;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (7)
70
/// <see cref="
IndexerDeclarationSyntax
"/> for indexer expression bodies.
432
AccessorDeclarationSyntax { Parent.Parent:
IndexerDeclarationSyntax
{ ParameterList: var list } } => list,
1206
var oldHasExpressionBody = oldNode is PropertyDeclarationSyntax { ExpressionBody: not null } or
IndexerDeclarationSyntax
{ ExpressionBody: not null };
1207
var newHasExpressionBody = newNode is PropertyDeclarationSyntax { ExpressionBody: not null } or
IndexerDeclarationSyntax
{ ExpressionBody: not null };
1333
if (node is PropertyDeclarationSyntax { ExpressionBody: not null } or
IndexerDeclarationSyntax
{ ExpressionBody: not null })
1706
var
indexerDeclaration = (
IndexerDeclarationSyntax
)node;
EditAndContinue\DeclarationBody\PropertyOrIndexerWithExplicitBodyDeclarationBody.cs (1)
19
=> (propertyOrIndexer is PropertyDeclarationSyntax property) ? property.ExpressionBody! : ((
IndexerDeclarationSyntax
)propertyOrIndexer).ExpressionBody!;
EditAndContinue\SyntaxUtilities.cs (1)
146
if (declaration is
IndexerDeclarationSyntax
indexer)
InheritanceMargin\CSharpInheritanceMarginService.cs (1)
73
IndexerDeclarationSyntax
indexerDeclarationNode => indexerDeclarationNode.ThisKeyword,
LineSeparators\CSharpLineSeparatorService.cs (1)
149
=> IsBadAccessorList(node as
IndexerDeclarationSyntax
);
Organizing\Organizers\IndexerDeclarationOrganizer.cs (3)
17
internal class IndexerDeclarationOrganizer : AbstractSyntaxNodeOrganizer<
IndexerDeclarationSyntax
>
25
protected override
IndexerDeclarationSyntax
Organize(
26
IndexerDeclarationSyntax
syntax,
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
202
IndexerDeclarationSyntax
indexerDeclaration => indexerDeclaration.ThisKeyword,
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForIndexersHelper.cs (17)
19
UseExpressionBodyHelper<
IndexerDeclarationSyntax
>
36
protected override BlockSyntax GetBody(
IndexerDeclarationSyntax
declaration)
39
protected override ArrowExpressionClauseSyntax GetExpressionBody(
IndexerDeclarationSyntax
declaration)
42
protected override SyntaxToken GetSemicolonToken(
IndexerDeclarationSyntax
declaration)
45
protected override
IndexerDeclarationSyntax
WithSemicolonToken(
IndexerDeclarationSyntax
declaration, SyntaxToken token)
48
protected override
IndexerDeclarationSyntax
WithExpressionBody(
IndexerDeclarationSyntax
declaration, ArrowExpressionClauseSyntax expressionBody)
51
protected override
IndexerDeclarationSyntax
WithAccessorList(
IndexerDeclarationSyntax
declaration, AccessorListSyntax accessorList)
54
protected override
IndexerDeclarationSyntax
WithBody(
IndexerDeclarationSyntax
declaration, BlockSyntax body)
64
protected override
IndexerDeclarationSyntax
WithGenerateBody(SemanticModel semanticModel,
IndexerDeclarationSyntax
declaration)
67
protected override bool CreateReturnStatementForExpression(SemanticModel semanticModel,
IndexerDeclarationSyntax
declaration) => true;
70
IndexerDeclarationSyntax
declaration,
79
protected override Location GetDiagnosticLocation(
IndexerDeclarationSyntax
declaration)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (2)
93
var
oldIndexer = node.Parent?.Parent as
IndexerDeclarationSyntax
;
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (3)
233
var
t = (
IndexerDeclarationSyntax
)node;
401
arrowExpr = ((
IndexerDeclarationSyntax
)node).ExpressionBody;
Structure\CSharpBlockStructureProvider.cs (1)
37
builder.Add<
IndexerDeclarationSyntax
, IndexerDeclarationStructureProvider>();
Structure\CSharpStructureHelpers.cs (1)
279
IndexerDeclarationSyntax
indexerDeclaration => indexerDeclaration.Modifiers.FirstOrNull() ?? indexerDeclaration.Type.GetFirstToken(),
Structure\Providers\IndexerDeclarationStructureProvider.cs (2)
12
internal class IndexerDeclarationStructureProvider : AbstractSyntaxNodeStructureProvider<
IndexerDeclarationSyntax
>
16
IndexerDeclarationSyntax
indexerDeclaration,
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (9)
Compilation\SemanticModelAPITests.cs (4)
1664
var
indexerDecl = (
IndexerDeclarationSyntax
)typeDecl.Members[0];
2444
var
indexerDecl = (
IndexerDeclarationSyntax
)typeDecl.Members[0];
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (4)
334
var
indexerDecl = (
IndexerDeclarationSyntax
)typeDecl.Members[0];
543
var
node = (
IndexerDeclarationSyntax
)typeDecl.Members[0];
Symbols\PartialPropertiesTests.cs (1)
4969
var indexers = tree.GetRoot().DescendantNodes().OfType<
IndexerDeclarationSyntax
>().ToArray();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (20)
Generated\Syntax.Test.xml.Generated.cs (5)
10805
private static
IndexerDeclarationSyntax
GenerateIndexerDeclaration()
13413
var
node = GenerateIndexerDeclaration();
13424
var
newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithType(node.Type).WithExplicitInterfaceSpecifier(node.ExplicitInterfaceSpecifier).WithThisKeyword(node.ThisKeyword).WithParameterList(node.ParameterList).WithAccessorList(node.AccessorList).WithExpressionBody(node.ExpressionBody).WithSemicolonToken(node.SemicolonToken);
19091
var
oldNode = GenerateIndexerDeclaration();
19107
var
oldNode = GenerateIndexerDeclaration();
LexicalAndXml\XmlDocCommentTests.cs (2)
1937
Assert.Equal(typeof(
IndexerDeclarationSyntax
), (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Members[0].GetType());
1939
var keyword = ((tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Members[0] as
IndexerDeclarationSyntax
).Type;
Parsing\DeclarationParsingTests.cs (10)
4950
var
ps = (
IndexerDeclarationSyntax
)cs.Members[0];
5017
var
ps = (
IndexerDeclarationSyntax
)cs.Members[0];
5085
var
ps = (
IndexerDeclarationSyntax
)cs.Members[0];
5152
var
ps = (
IndexerDeclarationSyntax
)cs.Members[0];
5228
var
ps = (
IndexerDeclarationSyntax
)cs.Members[0];
Parsing\ParserErrorMessageTests.cs (3)
3782
var
indexerDeclaration = (
IndexerDeclarationSyntax
)tree.GetRoot().DescendantNodes().Single(node => node is
IndexerDeclarationSyntax
);
Microsoft.CodeAnalysis.CSharp.Workspaces (40)
CodeGeneration\CSharpSyntaxGenerator.cs (14)
450
IndexerDeclarationSyntax
indexer => indexer.WithAccessorList(CreateAccessorList(indexer.AccessorList, accessorDeclarations))
633
SyntaxKind.IndexerDeclaration => ((
IndexerDeclarationSyntax
)declaration).WithExplicitInterfaceSpecifier(specifier),
661
var
ind = (
IndexerDeclarationSyntax
)declaration;
844
var
indexer = (
IndexerDeclarationSyntax
)member;
1955
return ((
IndexerDeclarationSyntax
)declaration).Type;
1991
SyntaxKind.IndexerDeclaration => ((
IndexerDeclarationSyntax
)declaration).WithType((TypeSyntax)type),
2223
return ((
IndexerDeclarationSyntax
)declaration).WithParameterList(list);
2271
var
id = (
IndexerDeclarationSyntax
)declaration;
2327
var
id = (
IndexerDeclarationSyntax
)declaration;
2539
SyntaxKind.IndexerDeclaration => ((
IndexerDeclarationSyntax
)declaration).ExpressionBody == null,
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (3)
337
var
indexerDecl = (
IndexerDeclarationSyntax
)node;
504
private static string GetIndexerSuffix(
IndexerDeclarationSyntax
indexer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (4)
58
return ((
IndexerDeclarationSyntax
)member).ThisKeyword;
127
return ((
IndexerDeclarationSyntax
)member).WithParameterList((BracketedParameterListSyntax)parameterList);
153
return ((
IndexerDeclarationSyntax
)member).Type;
176
IndexerDeclarationSyntax
indexer => indexer.ExpressionBody,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (2)
149
IndexerDeclarationSyntax
indexerDeclaration => indexerDeclaration.ParameterList,
349
case BaseMethodDeclarationSyntax or
IndexerDeclarationSyntax
or EventDeclarationSyntax:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
61
return ((
IndexerDeclarationSyntax
)declaration).ExplicitInterfaceSpecifier == null;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (2)
814
var
indexerDeclarationSyntax = (
IndexerDeclarationSyntax
)syntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (4)
127
return Compare((
IndexerDeclarationSyntax
)x, (
IndexerDeclarationSyntax
)y);
249
private static int Compare(
IndexerDeclarationSyntax
x,
IndexerDeclarationSyntax
y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (3)
97
var
declaration = IndexerDeclaration(
196
private static
IndexerDeclarationSyntax
UseExpressionBodyIfDesired(
197
CSharpCodeGenerationContextInfo info,
IndexerDeclarationSyntax
declaration, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BasePropertyDeclarationSyntaxExtensions.cs (6)
13
/// Available if <paramref name="node"/> is <see cref="PropertyDeclarationSyntax"/> or <see cref="
IndexerDeclarationSyntax
"/>.
22
case SyntaxKind.IndexerDeclaration: return ((
IndexerDeclarationSyntax
)node).SemicolonToken;
30
/// Available if <paramref name="node"/> is <see cref="PropertyDeclarationSyntax"/> or <see cref="
IndexerDeclarationSyntax
"/>.
40
case SyntaxKind.IndexerDeclaration: return ((
IndexerDeclarationSyntax
)node).WithSemicolonToken(semicolonToken);
48
/// Available if <paramref name="node"/> is <see cref="PropertyDeclarationSyntax"/> or <see cref="
IndexerDeclarationSyntax
"/>.
58
case SyntaxKind.IndexerDeclaration: return ((
IndexerDeclarationSyntax
)node).WithExpressionBody(expressionBody);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (1)
523
targetToken.IsAccessorDeclarationContext<
IndexerDeclarationSyntax
>(position, kind);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (20)
CodeGeneration\SyntaxGeneratorTests.cs (20)
1085
VerifySyntax<
IndexerDeclarationSyntax
>(
1089
VerifySyntax<
IndexerDeclarationSyntax
>(
1093
VerifySyntax<
IndexerDeclarationSyntax
>(
1097
VerifySyntax<
IndexerDeclarationSyntax
>(
1101
VerifySyntax<
IndexerDeclarationSyntax
>(
1105
VerifySyntax<
IndexerDeclarationSyntax
>(
1110
VerifySyntax<
IndexerDeclarationSyntax
>(
1115
VerifySyntax<
IndexerDeclarationSyntax
>(
1119
VerifySyntax<
IndexerDeclarationSyntax
>(
1124
VerifySyntax<
IndexerDeclarationSyntax
>(
1181
VerifySyntax<
IndexerDeclarationSyntax
>(
1380
VerifySyntax<
IndexerDeclarationSyntax
>(
1406
VerifySyntax<
IndexerDeclarationSyntax
>(
1484
VerifySyntax<
IndexerDeclarationSyntax
>(
1874
VerifySyntax<
IndexerDeclarationSyntax
>(
2510
VerifySyntax<
IndexerDeclarationSyntax
>(
3424
VerifySyntax<
IndexerDeclarationSyntax
>(
3428
VerifySyntax<
IndexerDeclarationSyntax
>(
3433
VerifySyntax<
IndexerDeclarationSyntax
>(
4286
VerifySyntax<
IndexerDeclarationSyntax
>(
Microsoft.VisualStudio.LanguageServices.CSharp (10)
CodeModel\CSharpCodeModelService.CodeModelEventCollector.cs (3)
335
if (oldProperty is
IndexerDeclarationSyntax
oldIndexer)
337
var
newIndexer = (
IndexerDeclarationSyntax
)newProperty;
CodeModel\CSharpCodeModelService.cs (5)
821
return ((
IndexerDeclarationSyntax
)node).ExplicitInterfaceSpecifier?.ToString() +
822
((
IndexerDeclarationSyntax
)node).ThisKeyword.ToString();
1456
else if (parentNode is
IndexerDeclarationSyntax
indexer)
3419
else if (container is
IndexerDeclarationSyntax
indexer)
3477
else if (container is
IndexerDeclarationSyntax
indexer)
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (2)
234
var
indexerDeclaration = (
IndexerDeclarationSyntax
)node;
System.Text.RegularExpressions.Generator (2)
RegexGenerator.cs (1)
60
(node, _) => node is MethodDeclarationSyntax or PropertyDeclarationSyntax or
IndexerDeclarationSyntax
or AccessorDeclarationSyntax,
RegexGenerator.Parser.cs (1)
29
if (context.TargetNode is
IndexerDeclarationSyntax
or AccessorDeclarationSyntax)