using System.Collections.Generic; using Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax; namespace Microsoft.CodeAnalysis.CSharp.Syntax; public sealed class DocumentationCommentTriviaSyntax : StructuredTriviaSyntax { private SyntaxNode? content; public SyntaxList Content => new SyntaxList(((SyntaxNode)this).GetRed(ref content, 0)); public SyntaxToken EndOfComment => new SyntaxToken((SyntaxNode)(object)this, (GreenNode)(object)((Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.DocumentationCommentTriviaSyntax)(object)((SyntaxNode)this).Green).endOfComment, ((SyntaxNode)this).GetChildPosition(1), ((SyntaxNode)this).GetChildIndex(1)); internal DocumentationCommentTriviaSyntax(Microsoft.CodeAnalysis.CSharp.Syntax.InternalSyntax.CSharpSyntaxNode green, SyntaxNode? parent, int position) : base(green, parent, position) { } internal override SyntaxNode? GetNodeSlot(int index) { if (index != 0) { return null; } return ((SyntaxNode)this).GetRedAtZero(ref content); } internal override SyntaxNode? GetCachedSlot(int index) { if (index != 0) { return null; } return content; } public override void Accept(CSharpSyntaxVisitor visitor) { visitor.VisitDocumentationCommentTrivia(this); } public override TResult? Accept(CSharpSyntaxVisitor visitor) { return visitor.VisitDocumentationCommentTrivia(this); } public DocumentationCommentTriviaSyntax Update(SyntaxList content, SyntaxToken endOfComment) { //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_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: 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) if (content != Content || endOfComment != EndOfComment) { DocumentationCommentTriviaSyntax documentationCommentTriviaSyntax = SyntaxFactory.DocumentationCommentTrivia(Kind(), content, endOfComment); SyntaxAnnotation[] annotations = ((SyntaxNode)this).GetAnnotations(); if (annotations == null || annotations.Length == 0) { return documentationCommentTriviaSyntax; } return documentationCommentTriviaSyntax.WithAnnotations(annotations); } return this; } public DocumentationCommentTriviaSyntax WithContent(SyntaxList content) { //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) return Update(content, EndOfComment); } public DocumentationCommentTriviaSyntax WithEndOfComment(SyntaxToken endOfComment) { //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) return Update(Content, endOfComment); } public DocumentationCommentTriviaSyntax AddContent(params XmlNodeSyntax[] 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 WithContent(Content.AddRange((IEnumerable)items)); } }