XmlComment.cs 869 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // System.Xml.XmlComment
  3. //
  4. // Author:
  5. // Kral Ferch <[email protected]>
  6. //
  7. // (C) 2002 Kral Ferch
  8. //
  9. using System;
  10. namespace System.Xml
  11. {
  12. public class XmlComment : XmlCharacterData
  13. {
  14. #region Constructors
  15. protected internal XmlComment (string comment, XmlDocument doc) : base(comment, doc) { }
  16. #endregion
  17. #region Properties
  18. public override string LocalName {
  19. get { return "#comment"; }
  20. }
  21. public override string Name {
  22. get { return "#comment"; }
  23. }
  24. public override XmlNodeType NodeType {
  25. get { return XmlNodeType.Comment; }
  26. }
  27. #endregion
  28. #region Methods
  29. public override XmlNode CloneNode (bool deep)
  30. {
  31. return new XmlComment(Value, OwnerDocument);
  32. }
  33. public override void WriteContentTo (XmlWriter w) { }
  34. public override void WriteTo (XmlWriter w)
  35. {
  36. w.WriteComment (Data);
  37. }
  38. #endregion
  39. }
  40. }