using System.Collections.Generic; using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax; namespace Microsoft.CodeAnalysis.CSharp.Syntax; public sealed class DestructorDeclarationSyntax : BaseMethodDeclarationSyntax { private SyntaxNode? attributeLists; private ParameterListSyntax? parameterList; private BlockSyntax? body; private ArrowExpressionClauseSyntax? expressionBody; public override SyntaxList AttributeLists => new SyntaxList(((SyntaxNode)this).GetRed(ref attributeLists, 0)); public override SyntaxTokenList Modifiers { get { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) GreenNode slot = ((SyntaxNode)this).Green.GetSlot(1); if (slot == null) { return default(SyntaxTokenList); } return new SyntaxTokenList((SyntaxNode)(object)this, slot, ((SyntaxNode)this).GetChildPosition(1), ((SyntaxNode)this).GetChildIndex(1)); } } public SyntaxToken TildeToken => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.DestructorDeclarationSyntax)(object)((SyntaxNode)this).Green).tildeToken, ((SyntaxNode)this).GetChildPosition(2), ((SyntaxNode)this).GetChildIndex(2)); public SyntaxToken Identifier => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.DestructorDeclarationSyntax)(object)((SyntaxNode)this).Green).identifier, ((SyntaxNode)this).GetChildPosition(3), ((SyntaxNode)this).GetChildIndex(3)); public override ParameterListSyntax ParameterList => ((SyntaxNode)this).GetRed(ref parameterList, 4); public override BlockSyntax? Body => ((SyntaxNode)this).GetRed(ref body, 5); public override ArrowExpressionClauseSyntax? ExpressionBody => ((SyntaxNode)this).GetRed(ref expressionBody, 6); public override SyntaxToken SemicolonToken { get { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) SyntaxToken semicolonToken = ((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.DestructorDeclarationSyntax)(object)((SyntaxNode)this).Green).semicolonToken; if (semicolonToken == null) { return default(SyntaxToken); } return new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)semicolonToken, ((SyntaxNode)this).GetChildPosition(7), ((SyntaxNode)this).GetChildIndex(7)); } } public DestructorDeclarationSyntax Update(SyntaxList attributeLists, SyntaxTokenList modifiers, SyntaxToken tildeToken, SyntaxToken identifier, ParameterListSyntax parameterList, BlockSyntax body, SyntaxToken semicolonToken) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) return Update(attributeLists, modifiers, tildeToken, identifier, parameterList, body, null, semicolonToken); } internal DestructorDeclarationSyntax(Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode green, SyntaxNode? parent, int position) : base(green, parent, position) { } internal override SyntaxNode? GetNodeSlot(int index) { return (SyntaxNode?)(index switch { 0 => ((SyntaxNode)this).GetRedAtZero(ref attributeLists), 4 => ((SyntaxNode)this).GetRed(ref parameterList, 4), 5 => ((SyntaxNode)this).GetRed(ref body, 5), 6 => ((SyntaxNode)this).GetRed(ref expressionBody, 6), _ => null, }); } internal override SyntaxNode? GetCachedSlot(int index) { return (SyntaxNode?)(index switch { 0 => attributeLists, 4 => parameterList, 5 => body, 6 => expressionBody, _ => null, }); } public override void Accept(CSharpSyntaxVisitor visitor) { visitor.VisitDestructorDeclaration(this); } public override TResult? Accept(CSharpSyntaxVisitor visitor) { return visitor.VisitDestructorDeclaration(this); } public DestructorDeclarationSyntax Update(SyntaxList attributeLists, SyntaxTokenList modifiers, SyntaxToken tildeToken, SyntaxToken identifier, ParameterListSyntax parameterList, BlockSyntax? body, ArrowExpressionClauseSyntax? expressionBody, SyntaxToken semicolonToken) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) if (attributeLists != AttributeLists || modifiers != Modifiers || tildeToken != TildeToken || identifier != Identifier || parameterList != ParameterList || body != Body || expressionBody != ExpressionBody || semicolonToken != SemicolonToken) { DestructorDeclarationSyntax destructorDeclarationSyntax = SyntaxFactory.DestructorDeclaration(attributeLists, modifiers, tildeToken, identifier, parameterList, body, expressionBody, semicolonToken); SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations(); if (annotations == null || annotations.Length == 0) { return destructorDeclarationSyntax; } return destructorDeclarationSyntax.WithAnnotations(annotations); } return this; } internal override MemberDeclarationSyntax WithAttributeListsCore(SyntaxList attributeLists) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return WithAttributeLists(attributeLists); } public new DestructorDeclarationSyntax WithAttributeLists(SyntaxList attributeLists) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) return Update(attributeLists, Modifiers, TildeToken, Identifier, ParameterList, Body, ExpressionBody, SemicolonToken); } internal override MemberDeclarationSyntax WithModifiersCore(SyntaxTokenList modifiers) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return WithModifiers(modifiers); } public new DestructorDeclarationSyntax WithModifiers(SyntaxTokenList modifiers) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, modifiers, TildeToken, Identifier, ParameterList, Body, ExpressionBody, SemicolonToken); } public DestructorDeclarationSyntax WithTildeToken(SyntaxToken tildeToken) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, Modifiers, tildeToken, Identifier, ParameterList, Body, ExpressionBody, SemicolonToken); } public DestructorDeclarationSyntax WithIdentifier(SyntaxToken identifier) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, Modifiers, TildeToken, identifier, ParameterList, Body, ExpressionBody, SemicolonToken); } internal override BaseMethodDeclarationSyntax WithParameterListCore(ParameterListSyntax parameterList) { return WithParameterList(parameterList); } public new DestructorDeclarationSyntax WithParameterList(ParameterListSyntax parameterList) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, Modifiers, TildeToken, Identifier, parameterList, Body, ExpressionBody, SemicolonToken); } internal override BaseMethodDeclarationSyntax WithBodyCore(BlockSyntax? body) { return WithBody(body); } public new DestructorDeclarationSyntax WithBody(BlockSyntax? body) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, Modifiers, TildeToken, Identifier, ParameterList, body, ExpressionBody, SemicolonToken); } internal override BaseMethodDeclarationSyntax WithExpressionBodyCore(ArrowExpressionClauseSyntax? expressionBody) { return WithExpressionBody(expressionBody); } public new DestructorDeclarationSyntax WithExpressionBody(ArrowExpressionClauseSyntax? expressionBody) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, Modifiers, TildeToken, Identifier, ParameterList, Body, expressionBody, SemicolonToken); } internal override BaseMethodDeclarationSyntax WithSemicolonTokenCore(SyntaxToken semicolonToken) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return WithSemicolonToken(semicolonToken); } public new DestructorDeclarationSyntax WithSemicolonToken(SyntaxToken semicolonToken) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) return Update(AttributeLists, Modifiers, TildeToken, Identifier, ParameterList, Body, ExpressionBody, semicolonToken); } internal override MemberDeclarationSyntax AddAttributeListsCore(params AttributeListSyntax[] items) { return AddAttributeLists(items); } public new DestructorDeclarationSyntax AddAttributeLists(params AttributeListSyntax[] items) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) return WithAttributeLists(AttributeLists.AddRange((IEnumerable)items)); } internal override MemberDeclarationSyntax AddModifiersCore(params SyntaxToken[] items) { return AddModifiers(items); } public new DestructorDeclarationSyntax AddModifiers(params SyntaxToken[] items) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) SyntaxTokenList modifiers = Modifiers; return WithModifiers(((SyntaxTokenList)(ref modifiers)).AddRange((IEnumerable)items)); } internal override BaseMethodDeclarationSyntax AddParameterListParametersCore(params ParameterSyntax[] items) { return AddParameterListParameters(items); } public new DestructorDeclarationSyntax AddParameterListParameters(params ParameterSyntax[] items) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) return WithParameterList(ParameterList.WithParameters(ParameterList.Parameters.AddRange((IEnumerable)items))); } internal override BaseMethodDeclarationSyntax AddBodyAttributeListsCore(params AttributeListSyntax[] items) { return AddBodyAttributeLists(items); } public new DestructorDeclarationSyntax AddBodyAttributeLists(params AttributeListSyntax[] items) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) BlockSyntax blockSyntax = Body ?? SyntaxFactory.Block(); return WithBody(blockSyntax.WithAttributeLists(blockSyntax.AttributeLists.AddRange((IEnumerable)items))); } internal override BaseMethodDeclarationSyntax AddBodyStatementsCore(params StatementSyntax[] items) { return AddBodyStatements(items); } public new DestructorDeclarationSyntax AddBodyStatements(params StatementSyntax[] items) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) BlockSyntax blockSyntax = Body ?? SyntaxFactory.Block(); return WithBody(blockSyntax.WithStatements(blockSyntax.Statements.AddRange((IEnumerable)items))); } }