40 references to ExpressionBody
Microsoft.CodeAnalysis.CSharp (16)
_generated\0\Syntax.xml.Main.Generated.cs (1)
2098
=> node.Update(VisitList(node.AttributeLists), VisitList(node.Modifiers), (TypeSyntax?)Visit(node.Type) ?? throw new ArgumentNullException("type"), (ExplicitInterfaceSpecifierSyntax?)Visit(node.ExplicitInterfaceSpecifier), VisitToken(node.ThisKeyword), (BracketedParameterListSyntax?)Visit(node.ParameterList) ?? throw new ArgumentNullException("parameterList"), (AccessorListSyntax?)Visit(node.AccessorList), (ArrowExpressionClauseSyntax?)Visit(node.
ExpressionBody
), VisitToken(node.SemicolonToken));
_generated\2\Syntax.xml.Syntax.Generated.cs (9)
13443
if (attributeLists != this.AttributeLists || modifiers != this.Modifiers || type != this.Type || explicitInterfaceSpecifier != this.ExplicitInterfaceSpecifier || thisKeyword != this.ThisKeyword || parameterList != this.ParameterList || accessorList != this.AccessorList || expressionBody != this.
ExpressionBody
|| semicolonToken != this.SemicolonToken)
13454
public new IndexerDeclarationSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.Modifiers, this.Type, this.ExplicitInterfaceSpecifier, this.ThisKeyword, this.ParameterList, this.AccessorList, this.
ExpressionBody
, this.SemicolonToken);
13456
public new IndexerDeclarationSyntax WithModifiers(SyntaxTokenList modifiers) => Update(this.AttributeLists, modifiers, this.Type, this.ExplicitInterfaceSpecifier, this.ThisKeyword, this.ParameterList, this.AccessorList, this.
ExpressionBody
, this.SemicolonToken);
13458
public new IndexerDeclarationSyntax WithType(TypeSyntax type) => Update(this.AttributeLists, this.Modifiers, type, this.ExplicitInterfaceSpecifier, this.ThisKeyword, this.ParameterList, this.AccessorList, this.
ExpressionBody
, this.SemicolonToken);
13460
public new IndexerDeclarationSyntax WithExplicitInterfaceSpecifier(ExplicitInterfaceSpecifierSyntax? explicitInterfaceSpecifier) => Update(this.AttributeLists, this.Modifiers, this.Type, explicitInterfaceSpecifier, this.ThisKeyword, this.ParameterList, this.AccessorList, this.
ExpressionBody
, this.SemicolonToken);
13461
public IndexerDeclarationSyntax WithThisKeyword(SyntaxToken thisKeyword) => Update(this.AttributeLists, this.Modifiers, this.Type, this.ExplicitInterfaceSpecifier, thisKeyword, this.ParameterList, this.AccessorList, this.
ExpressionBody
, this.SemicolonToken);
13462
public IndexerDeclarationSyntax WithParameterList(BracketedParameterListSyntax parameterList) => Update(this.AttributeLists, this.Modifiers, this.Type, this.ExplicitInterfaceSpecifier, this.ThisKeyword, parameterList, this.AccessorList, this.
ExpressionBody
, this.SemicolonToken);
13464
public new IndexerDeclarationSyntax WithAccessorList(AccessorListSyntax? accessorList) => Update(this.AttributeLists, this.Modifiers, this.Type, this.ExplicitInterfaceSpecifier, this.ThisKeyword, this.ParameterList, accessorList, this.
ExpressionBody
, this.SemicolonToken);
13466
public IndexerDeclarationSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.AttributeLists, this.Modifiers, this.Type, this.ExplicitInterfaceSpecifier, this.ThisKeyword, this.ParameterList, this.AccessorList, this.
ExpressionBody
, semicolonToken);
Compilation\SyntaxTreeSemanticModel.cs (1)
904
return GetOrAddModelIfContains(indexerDecl.
ExpressionBody
, span);
src\roslyn\src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (3)
269
if (t.
ExpressionBody
!= null)
271
ComputeDeclarations(model, associatedSymbol: null, t.
ExpressionBody
, shouldSkip, getSymbol, builder, levelsToCompute, cancellationToken);
454
arrowExpr = ((IndexerDeclarationSyntax)node).
ExpressionBody
;
Symbols\Source\SourcePropertySymbol.cs (1)
184
IndexerDeclarationSyntax i => i.
ExpressionBody
,
Syntax\SyntaxExtensions.cs (1)
50
arrowExpr = ((IndexerDeclarationSyntax)node).
ExpressionBody
;
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForIndexersHelper.cs (1)
39
=> declaration.
ExpressionBody
;
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
191
IndexerDeclarationSyntax indexer => indexer.
ExpressionBody
,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (1)
218
if (declaration.
ExpressionBody
== null)
Microsoft.CodeAnalysis.CSharp.Features (12)
EditAndContinue\BreakpointSpans.cs (2)
362
if (indexer.
ExpressionBody
!= null)
364
return indexer.
ExpressionBody
.Expression.Span;
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (3)
1192
var oldHasExpressionBody = oldNode is PropertyDeclarationSyntax { ExpressionBody: not null } or IndexerDeclarationSyntax {
ExpressionBody
: not null };
1193
var newHasExpressionBody = newNode is PropertyDeclarationSyntax { ExpressionBody: not null } or IndexerDeclarationSyntax {
ExpressionBody
: not null };
1319
if (node is PropertyDeclarationSyntax { ExpressionBody: not null } or IndexerDeclarationSyntax {
ExpressionBody
: not null })
EditAndContinue\DeclarationBody\PropertyOrIndexerWithExplicitBodyDeclarationBody.cs (1)
20
=> (propertyOrIndexer is PropertyDeclarationSyntax property) ? property.ExpressionBody! : ((IndexerDeclarationSyntax)propertyOrIndexer).
ExpressionBody
!;
EditAndContinue\SyntaxUtilities.cs (1)
148
return TryGetEffectiveGetterBody(indexer.
ExpressionBody
, indexer.AccessorList);
Organizing\Organizers\IndexerDeclarationOrganizer.cs (1)
37
expressionBody: syntax.
ExpressionBody
,
src\roslyn\src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForIndexersHelper.cs (1)
39
=> declaration.
ExpressionBody
;
src\roslyn\src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (3)
269
if (t.
ExpressionBody
!= null)
271
ComputeDeclarations(model, associatedSymbol: null, t.
ExpressionBody
, shouldSkip, getSymbol, builder, levelsToCompute, cancellationToken);
454
arrowExpr = ((IndexerDeclarationSyntax)node).
ExpressionBody
;
Microsoft.CodeAnalysis.CSharp.Workspaces (7)
CodeGeneration\CSharpSyntaxGenerator.cs (5)
2434
if (id.
ExpressionBody
!= null)
2436
return id.
ExpressionBody
.Expression;
2490
if (id.
ExpressionBody
!= null)
2492
return ReplaceWithTrivia(id, id.
ExpressionBody
.Expression, expr);
2701
SyntaxKind.IndexerDeclaration => ((IndexerDeclarationSyntax)declaration).
ExpressionBody
== null,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
191
IndexerDeclarationSyntax indexer => indexer.
ExpressionBody
,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (1)
218
if (declaration.
ExpressionBody
== null)
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
191
IndexerDeclarationSyntax indexer => indexer.
ExpressionBody
,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (1)
218
if (declaration.
ExpressionBody
== null)