Comment
sealed class Comment : CharacterData, IComment, ICharacterData, INode, IEventTarget, IMarkupFormattable, IChildNode, INonDocumentTypeChildNode
Represents a node that contains a comment.
using System.Diagnostics;
namespace AngleSharp.Dom
{
[DebuggerStepThrough]
internal sealed class Comment : CharacterData, IComment, ICharacterData, INode, IEventTarget, IMarkupFormattable, IChildNode, INonDocumentTypeChildNode
{
internal Comment(Document owner)
: this(owner, string.Empty)
{
}
internal Comment(Document owner, string data)
: base(owner, "#comment", NodeType.Comment, data)
{
}
public override INode Clone(bool deep = true)
{
Comment comment = new Comment(base.Owner, base.Data);
Node.CopyProperties(this, comment, deep);
return comment;
}
public override string ToHtml(IMarkupFormatter formatter)
{
return formatter.Comment(this);
}
}
}