Base:
property
Body
Microsoft.CodeAnalysis.CSharp.Syntax.BaseMethodDeclarationSyntax.Body
32 references to Body
Microsoft.CodeAnalysis.CSharp (16)
Binder\LocalBinderFactory.cs (1)
190
Visit(node.
Body
);
Compilation\SyntaxTreeSemanticModel.cs (1)
885
return (expressionBody?.FullSpan.Contains(span) == true || destructorDecl.
Body
?.FullSpan.Contains(span) == true) ?
Symbols\Source\SourceDestructorSymbol.cs (3)
24
base(containingType, syntax.GetReference(), GetSymbolLocation(syntax, out Location location), isIterator: SyntaxFacts.HasYieldOperations(syntax.
Body
),
29
bool hasBlockBody = syntax.
Body
!= null;
62
syntax.
Body
, syntax.ExpressionBody, syntax, diagnostics);
Syntax.xml.Main.Generated.cs (1)
2074
=> node.Update(VisitList(node.AttributeLists), VisitList(node.Modifiers), VisitToken(node.TildeToken), VisitToken(node.Identifier), (ParameterListSyntax?)Visit(node.ParameterList) ?? throw new ArgumentNullException("parameterList"), (BlockSyntax?)Visit(node.
Body
), (ArrowExpressionClauseSyntax?)Visit(node.ExpressionBody), VisitToken(node.SemicolonToken));
Syntax.xml.Syntax.Generated.cs (10)
12964
if (attributeLists != this.AttributeLists || modifiers != this.Modifiers || tildeToken != this.TildeToken || identifier != this.Identifier || parameterList != this.ParameterList || body != this.
Body
|| expressionBody != this.ExpressionBody || semicolonToken != this.SemicolonToken)
12975
public new DestructorDeclarationSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.Modifiers, this.TildeToken, this.Identifier, this.ParameterList, this.
Body
, this.ExpressionBody, this.SemicolonToken);
12977
public new DestructorDeclarationSyntax WithModifiers(SyntaxTokenList modifiers) => Update(this.AttributeLists, modifiers, this.TildeToken, this.Identifier, this.ParameterList, this.
Body
, this.ExpressionBody, this.SemicolonToken);
12978
public DestructorDeclarationSyntax WithTildeToken(SyntaxToken tildeToken) => Update(this.AttributeLists, this.Modifiers, tildeToken, this.Identifier, this.ParameterList, this.
Body
, this.ExpressionBody, this.SemicolonToken);
12979
public DestructorDeclarationSyntax WithIdentifier(SyntaxToken identifier) => Update(this.AttributeLists, this.Modifiers, this.TildeToken, identifier, this.ParameterList, this.
Body
, this.ExpressionBody, this.SemicolonToken);
12981
public new DestructorDeclarationSyntax WithParameterList(ParameterListSyntax parameterList) => Update(this.AttributeLists, this.Modifiers, this.TildeToken, this.Identifier, parameterList, this.
Body
, this.ExpressionBody, this.SemicolonToken);
12985
public new DestructorDeclarationSyntax WithExpressionBody(ArrowExpressionClauseSyntax? expressionBody) => Update(this.AttributeLists, this.Modifiers, this.TildeToken, this.Identifier, this.ParameterList, this.
Body
, expressionBody, this.SemicolonToken);
12987
public new DestructorDeclarationSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.AttributeLists, this.Modifiers, this.TildeToken, this.Identifier, this.ParameterList, this.
Body
, this.ExpressionBody, semicolonToken);
12998
var body = this.
Body
?? SyntaxFactory.Block();
13004
var body = this.
Body
?? SyntaxFactory.Block();
Microsoft.CodeAnalysis.CSharp.Features (8)
EditAndContinue\SyntaxUtilities.cs (1)
27
DestructorDeclarationSyntax destructorDeclaration => CreateSimpleBody(BlockOrExpression(destructorDeclaration.
Body
, destructorDeclaration.ExpressionBody)),
LineSeparators\CSharpLineSeparatorService.cs (3)
178
if (destructorDecl.
Body
!= null &&
179
(destructorDecl.
Body
.OpenBraceToken.IsMissing ||
180
destructorDecl.
Body
.CloseBraceToken.IsMissing))
Organizing\Organizers\DestructorDeclarationOrganizer.cs (1)
34
syntax.
Body
,
Structure\Providers\DestructorDeclarationStructureProvider.cs (3)
24
if (destructorDeclaration.
Body
== null ||
25
destructorDeclaration.
Body
.OpenBraceToken.IsMissing ||
26
destructorDeclaration.
Body
.CloseBraceToken.IsMissing)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\ExpressionBodiedMemberTests.cs (2)
580
Assert.Contains("P1", model.LookupNames(tree.GetRoot().DescendantNodes().OfType<DestructorDeclarationSyntax>().Single().
Body
.Position));
583
.
Body
.DescendantNodes().OfType<AssignmentExpressionSyntax>()
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
Generated\Syntax.Test.xml.Generated.cs (2)
13519
Assert.Null(node.
Body
);
13522
var newNode = node.WithAttributeLists(node.AttributeLists).WithModifiers(node.Modifiers).WithTildeToken(node.TildeToken).WithIdentifier(node.Identifier).WithParameterList(node.ParameterList).WithBody(node.
Body
).WithExpressionBody(node.ExpressionBody).WithSemicolonToken(node.SemicolonToken);
Parsing\DeclarationParsingTests.cs (3)
3591
Assert.NotNull(cn.
Body
);
3592
Assert.NotEqual(default, cn.
Body
.OpenBraceToken);
3593
Assert.NotEqual(default, cn.
Body
.CloseBraceToken);
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
CodeGeneration\CSharpSyntaxGenerator.cs (1)
2638
SyntaxKind.DestructorDeclaration => ((DestructorDeclarationSyntax)declaration).
Body
?.Statements,