public override SyntaxNode VisitXmlElementEndTag(XmlElementEndTagSyntax node) { bool anyChanges = false; var newLessThanSlashToken = ((PunctuationSyntax)Visit(node.LessThanSlashToken)); if (node.LessThanSlashToken != newLessThanSlashToken) { anyChanges = true; } var newName = ((XmlNameSyntax)Visit(node.NameNode)); if (node.NameNode != newName) { anyChanges = true; } var newGreaterThanToken = ((PunctuationSyntax)Visit(node.GreaterThanToken)); if (node.GreaterThanToken != newGreaterThanToken) { anyChanges = true; } if (anyChanges) { return(new XmlElementEndTagSyntax(node.Kind, newLessThanSlashToken, newName, newGreaterThanToken)); } else { return(node); } }
public XmlNodeSyntax CreateElement(XmlElementEndTagSyntax endElement) { Debug.Assert(endElement != null); var contentList = _content.ToList(); _pool.Free(_content); return SyntaxFactory.XmlElement(_start, contentList, endElement); }
public XmlElementSyntax(XmlElementStartTagSyntax start, SyntaxNode content, XmlElementEndTagSyntax end) : base(SyntaxKind.XmlElement) { StartTag = start; Content = content; EndTag = end; SlotCount = 3; }
public static XmlElementEndTagSyntax XmlElementEndTag(PunctuationSyntax lessThanSlashToken, XmlNameSyntax name, PunctuationSyntax greaterThanToken) { Debug.Assert(lessThanSlashToken != null && lessThanSlashToken.Kind == SyntaxKind.LessThanSlashToken); Debug.Assert(greaterThanToken != null && greaterThanToken.Kind == SyntaxKind.GreaterThanToken); var result = new XmlElementEndTagSyntax(SyntaxKind.XmlElementEndTag, lessThanSlashToken, name, greaterThanToken); return(result); }
public XmlNodeSyntax CreateElement(XmlElementEndTagSyntax endElement) { Debug.Assert(endElement != null); var contentList = _content.ToList(); _pool.Free(_content); return(SyntaxFactory.XmlElement(_start, contentList, endElement)); }
public XmlElementSyntax WithEndTag(XmlElementEndTagSyntax endTag) { return(this.Update(this.StartTag, this.Content, endTag)); }
public XmlElementSyntax Update(XmlElementStartTagSyntax startTag, SyntaxList <SyntaxNode> content, XmlElementEndTagSyntax endTag) { if (startTag != this.StartTag || content != this.Content || endTag != this.EndTag) { var newNode = SyntaxFactory.XmlElement(startTag, content, endTag); var annotations = this.GetAnnotations(); if (annotations != null && annotations.Length > 0) { return(newNode.WithAnnotations(annotations)); } return(newNode); } return(this); }
public static XmlElementSyntax XmlElement(XmlElementStartTagSyntax startElement, SyntaxNode content, XmlElementEndTagSyntax endElement) { return((XmlElementSyntax) new XmlElementSyntax.Green(startElement?.GreenNode, content?.GreenNode, endElement?.GreenNode).CreateRed()); }
public static XmlElementSyntax XmlElement(XmlElementStartTagSyntax startElement, SyntaxList <SyntaxNode> contentList, XmlElementEndTagSyntax endElement) { return(XmlElement(startElement, contentList.Node, endElement)); }
public virtual SyntaxNode VisitXmlElementEndTag(XmlElementEndTagSyntax node) { return(VisitXmlNode(node)); }
internal XmlNodeSyntax CreateElement(XmlElementEndTagSyntax missingEndElement, object v) { return(CreateElement(missingEndElement)); }
public virtual SyntaxNode VisitXmlElementEndTag(XmlElementEndTagSyntax node) { return VisitXmlNode(node); }
internal XmlNodeSyntax CreateElement(XmlElementEndTagSyntax missingEndElement, object v) { return CreateElement(missingEndElement); }
internal static XmlElementEndTagSyntax XmlElementEndTag(PunctuationSyntax lessThanSlashToken, XmlNameSyntax name, PunctuationSyntax greaterThanToken) { Debug.Assert(lessThanSlashToken != null && lessThanSlashToken.Kind == SyntaxKind.LessThanSlashToken); Debug.Assert(greaterThanToken != null && greaterThanToken.Kind == SyntaxKind.GreaterThanToken); var result = new XmlElementEndTagSyntax(SyntaxKind.XmlElementEndTag, lessThanSlashToken, name, greaterThanToken); return result; }
public static XmlNodeSyntax XmlElement(XmlElementStartTagSyntax startElement, SyntaxList<SyntaxNode> contentList, XmlElementEndTagSyntax endElement) { return new XmlElementSyntax(startElement, contentList.Node, endElement); }