81 references to DestructorDeclarationSyntax
Microsoft.CodeAnalysis.CSharp (21)
Binder\Binder_Statements.cs (1)
3549ConstructorDeclarationSyntax or DestructorDeclarationSyntax => MessageID.IDS_FeatureExpressionBodiedDeOrConstructor,
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
235public override Binder VisitDestructorDeclaration(DestructorDeclarationSyntax parent)
Binder\LocalBinderFactory.cs (1)
189public override void VisitDestructorDeclaration(DestructorDeclarationSyntax node)
Compilation\SyntaxTreeSemanticModel.cs (2)
883DestructorDeclarationSyntax destructorDecl = (DestructorDeclarationSyntax)memberDecl;
Parser\LanguageParser.cs (2)
3339private DestructorDeclarationSyntax ParseDestructorDeclaration(SyntaxList<AttributeListSyntax> attributes, SyntaxListBuilder modifiers) 5083return ((CSharp.Syntax.DestructorDeclarationSyntax)decl).Modifiers;
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
407arrowExpr = ((DestructorDeclarationSyntax)node).ExpressionBody;
Symbols\Source\SourceDestructorSymbol.cs (6)
20DestructorDeclarationSyntax syntax, 64private static (DeclarationModifiers, Flags) MakeModifiersAndFlags(NamedTypeSymbol containingType, DestructorDeclarationSyntax syntax, bool isNullableAnalysisEnabled, Location location, BindingDiagnosticBag diagnostics, out bool modifierErrors) 75private static Location GetSymbolLocation(DestructorDeclarationSyntax syntax, out Location location) 83var syntax = GetSyntax(); 88internal DestructorDeclarationSyntax GetSyntax() 91return (DestructorDeclarationSyntax)syntaxReferenceOpt.GetSyntax();
Symbols\Source\SourceMemberContainerSymbol.cs (2)
4997var destructorSyntax = (DestructorDeclarationSyntax)m;
Syntax\DestructorDeclarationSyntax.cs (5)
13public DestructorDeclarationSyntax Update( 37public static DestructorDeclarationSyntax DestructorDeclaration( 53public static DestructorDeclarationSyntax DestructorDeclaration( 71public static DestructorDeclarationSyntax DestructorDeclaration( 87public static DestructorDeclarationSyntax DestructorDeclaration(
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
56return ((DestructorDeclarationSyntax)member).Identifier;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (1)
527if (previousToken.Kind() == SyntaxKind.TildeToken && (previousToken.Parent is PrefixUnaryExpressionSyntax || previousToken.Parent is DestructorDeclarationSyntax))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
127DestructorDeclarationSyntax or
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
103var methodDecl = SyntaxFactory.DestructorDeclaration(classType.Name).AddBodyStatements(disposeStatement);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\DestructorGenerator.cs (5)
31var destructorDeclaration = GenerateDestructorDeclaration(destructor, info, cancellationToken); 41internal static DestructorDeclarationSyntax GenerateDestructorDeclaration( 44var reusableSyntax = GetReuseableSyntaxNodeForSymbol<DestructorDeclarationSyntax>(destructor, info); 52var declaration = DestructorDeclaration(
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Structure\DestructorDeclarationStructureTests.cs (1)
15public class DestructorDeclarationStructureTests : AbstractCSharpSyntaxNodeStructureTests<DestructorDeclarationSyntax>
Structure\MetadataAsSource\DestructorDeclarationStructureTests.cs (1)
15public class DestructorDeclarationStructureTests : AbstractCSharpSyntaxNodeStructureTests<DestructorDeclarationSyntax>
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\GetDiagnosticsTests.cs (1)
1031DestructorDeclarationSyntax destructorDecl => destructorDecl.Identifier.GetLocation(),
Microsoft.CodeAnalysis.CSharp.Features (15)
CodeLens\CSharpCodeLensMemberFinder.cs (1)
119public override void VisitDestructorDeclaration(DestructorDeclarationSyntax node)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (2)
1698var destructorDeclaration = (DestructorDeclarationSyntax)node;
EditAndContinue\SyntaxComparer.cs (1)
1459return ((DestructorDeclarationSyntax)node).Identifier;
EditAndContinue\SyntaxUtilities.cs (1)
27DestructorDeclarationSyntax destructorDeclaration => CreateSimpleBody(BlockOrExpression(destructorDeclaration.Body, destructorDeclaration.ExpressionBody)),
LineSeparators\CSharpLineSeparatorService.cs (1)
177if (node is DestructorDeclarationSyntax destructorDecl)
Organizing\Organizers\DestructorDeclarationOrganizer.cs (3)
17internal class DestructorDeclarationOrganizer : AbstractSyntaxNodeOrganizer<DestructorDeclarationSyntax> 25protected override DestructorDeclarationSyntax Organize( 26DestructorDeclarationSyntax syntax,
src\Analyzers\CSharp\CodeFixes\ImplementInterface\CSharpImplementInterfaceService.cs (1)
103var methodDecl = SyntaxFactory.DestructorDeclaration(classType.Name).AddBodyStatements(disposeStatement);
src\Compilers\CSharp\CSharpAnalyzerDriver\CSharpDeclarationComputer.cs (1)
407arrowExpr = ((DestructorDeclarationSyntax)node).ExpressionBody;
Structure\CSharpBlockStructureProvider.cs (1)
29builder.Add<DestructorDeclarationSyntax, DestructorDeclarationStructureProvider>();
Structure\CSharpStructureHelpers.cs (1)
273DestructorDeclarationSyntax destructorDeclaration => destructorDeclaration.TildeToken,
Structure\Providers\DestructorDeclarationStructureProvider.cs (2)
12internal class DestructorDeclarationStructureProvider : AbstractSyntaxNodeStructureProvider<DestructorDeclarationSyntax> 16DestructorDeclarationSyntax destructorDeclaration,
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\ExpressionBodiedMemberTests.cs (2)
580Assert.Contains("P1", model.LookupNames(tree.GetRoot().DescendantNodes().OfType<DestructorDeclarationSyntax>().Single().Body.Position)); 582var node2 = tree.GetRoot().DescendantNodes().OfType<DestructorDeclarationSyntax>().Single()
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\DestructorTests.cs (2)
407var destructorDecl = tree.GetCompilationUnitRoot().DescendantNodes().OfType<DestructorDeclarationSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (8)
Generated\Syntax.Test.xml.Generated.cs (5)
10793private static DestructorDeclarationSyntax GenerateDestructorDeclaration() 13350var node = GenerateDestructorDeclaration(); 13360var 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); 18987var oldNode = GenerateDestructorDeclaration(); 19003var oldNode = GenerateDestructorDeclaration();
IncrementalParsing\TypeChanges.cs (1)
33Assert.IsType<DestructorDeclarationSyntax>(classType.Members[0]);
Parsing\DeclarationParsingTests.cs (2)
3587var cn = (DestructorDeclarationSyntax)cs.Members[0];
Microsoft.CodeAnalysis.CSharp.Workspaces (12)
Classification\ClassificationHelpers.cs (1)
214else if (token.Parent is DestructorDeclarationSyntax destructorDeclaration && destructorDeclaration.Identifier == token)
CodeGeneration\CSharpSyntaxGenerator.cs (3)
2241return ((DestructorDeclarationSyntax)declaration).WithParameterList(list); 2486SyntaxKind.DestructorDeclaration => ((DestructorDeclarationSyntax)declaration).Body?.Statements, 2517return ((DestructorDeclarationSyntax)declaration).WithBody(somebody).WithSemicolonToken(semicolon).WithExpressionBody(null);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (1)
56return ((DestructorDeclarationSyntax)member).Identifier;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (1)
527if (previousToken.Kind() == SyntaxKind.TildeToken && (previousToken.Parent is PrefixUnaryExpressionSyntax || previousToken.Parent is DestructorDeclarationSyntax))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (1)
127DestructorDeclarationSyntax or
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\DestructorGenerator.cs (5)
31var destructorDeclaration = GenerateDestructorDeclaration(destructor, info, cancellationToken); 41internal static DestructorDeclarationSyntax GenerateDestructorDeclaration( 44var reusableSyntax = GetReuseableSyntaxNodeForSymbol<DestructorDeclarationSyntax>(destructor, info); 52var declaration = DestructorDeclaration(
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
CodeGeneration\SyntaxGeneratorTests.cs (1)
2593VerifySyntax<DestructorDeclarationSyntax>(
Microsoft.DotNet.GenFacades (1)
NotSupportedAssemblyGenerator.cs (1)
163public override SyntaxNode VisitDestructorDeclaration(DestructorDeclarationSyntax node)
Microsoft.VisualStudio.LanguageServices.CSharp (7)
CodeModel\CSharpCodeModelService.cs (5)
816return "~" + ((DestructorDeclarationSyntax)node).Identifier.ToString(); 896return ((DestructorDeclarationSyntax)node).WithIdentifier(newIdentifier); 939var destructor = ((DestructorDeclarationSyntax)member).WithIdentifier(newIdentifier); 3404else if (container is DestructorDeclarationSyntax destructor)
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
401startPosition = ((DestructorDeclarationSyntax)node).Identifier.SpanStart; 964endPosition = ((DestructorDeclarationSyntax)node).Identifier.Span.End;