XmlCharacterData.cs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. // System.Xml.XmlCharacterData.cs
  2. //
  3. // Author: Daniel Weber ([email protected])
  4. //
  5. // Implementation of abstract Xml.XmlCharacterData class
  6. //
  7. // Provides text manipulation methods used by derived classes
  8. // abstract class
  9. using System;
  10. namespace System.Xml
  11. {
  12. /// <summary>
  13. /// Abstratc class to provide text manipulation methods for derived classes
  14. /// </summary>
  15. public abstract class XmlCharacterData : XmlLinkedNode
  16. {
  17. // ============ Public Properties =====================================
  18. //=====================================================================
  19. /// <summary>
  20. /// Contains the nodes data
  21. /// </summary>
  22. public virtual string Data
  23. {
  24. get
  25. {
  26. // TODO - implement Data {get;}
  27. throw new NotImplementedException();
  28. }
  29. set
  30. {
  31. // TODO - implement Data {set;}
  32. throw new NotImplementedException();
  33. }
  34. }
  35. /// <summary>
  36. /// Get/Set the nodes value
  37. /// </summary>
  38. public override string Value
  39. {
  40. get
  41. {
  42. // TODO - implement Value {get;}
  43. throw new NotImplementedException();
  44. }
  45. set
  46. {
  47. // TODO - implement Value {set;}
  48. throw new NotImplementedException();
  49. }
  50. }
  51. public override string InnerText
  52. {
  53. get
  54. {
  55. // TODO - implement InnerText {get;}
  56. throw new NotImplementedException();
  57. }
  58. set
  59. {
  60. // TODO - implement InnerText {set;}
  61. throw new NotImplementedException();
  62. }
  63. }
  64. /// <summary>
  65. /// Returns the length of data, in characters
  66. /// </summary>
  67. public virtual int Length
  68. {
  69. get
  70. {
  71. // TODO - implement Length {get;}
  72. throw new NotImplementedException();
  73. }
  74. }
  75. // ============ Public Methods =======================================
  76. //=====================================================================
  77. /// <summary>
  78. /// Appends string strData to the end of data
  79. /// </summary>
  80. /// <param name="strData"></param>
  81. public virtual void AppendData(string strData)
  82. {
  83. // TODO - implement AppendData(strData)
  84. throw new NotImplementedException();
  85. }
  86. /// <summary>
  87. /// Remove a range of characters from the node
  88. /// </summary>
  89. /// <param name="offset">offset, in characters, to start delete</param>
  90. /// <param name="count">Number of characters to delete</param>
  91. public virtual void DeleteData(int offset, int count)
  92. {
  93. // TODO - implement DeleteData(offset, count)
  94. throw new NotImplementedException();
  95. }
  96. /// <summary>
  97. /// Replaces the number of characters, starting at offset, with the passed string
  98. /// </summary>
  99. /// <param name="offset">Offset (in characters) to start replacement</param>
  100. /// <param name="count">Number of characters to replace</param>
  101. /// <param name="strData">Replacement string</param>
  102. public virtual void ReplaceData(int offset, int count, string strData)
  103. {
  104. // TODO - implement ReplaceData(offset, count, strData)
  105. throw new NotImplementedException();
  106. }
  107. /// <summary>
  108. /// Retrieves a substring of the specified range
  109. /// </summary>
  110. /// <param name="offset">Character offset to begin string</param>
  111. /// <param name="count">Number of characters to return</param>
  112. /// <returns></returns>
  113. public virtual string Substring(int offset, int count)
  114. {
  115. // TODO - implement Substring(offset, count)
  116. throw new NotImplementedException();
  117. }
  118. // ============ Protected Methods ====================================
  119. //=====================================================================
  120. /// <summary>
  121. /// Listed in beta 2, but no description
  122. /// [to be supplied]
  123. /// </summary>
  124. /// <param name="node"></param>
  125. /// <param name="xnt"></param>
  126. /// <returns></returns>
  127. protected internal bool DecideXPNodeTypeForWhitespace(
  128. XmlNode node,
  129. ref XPathNodeType xnt
  130. )
  131. {
  132. // TODO
  133. throw new NotImplementedException();
  134. }
  135. // Constructors
  136. internal XmlCharacterData ( XmlDocument aOwnerDoc) : base(aOwnerDoc)
  137. {
  138. }
  139. }
  140. }