XmlValidatingReader.cs 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. //
  2. // System.Xml.XmlValidatingReader.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2002
  8. //
  9. using System.IO;
  10. using System.Text;
  11. using System.Xml.Schema;
  12. namespace System.Xml {
  13. public class XmlValidatingReader : XmlReader, IXmlLineInfo {
  14. #region Fields
  15. EntityHandling entityHandling;
  16. bool namespaces;
  17. XmlReader reader;
  18. ValidationType validationType;
  19. #endregion // Fields
  20. #region Constructors
  21. [MonoTODO]
  22. public XmlValidatingReader (XmlReader reader)
  23. : base ()
  24. {
  25. if (!(reader is XmlTextReader))
  26. throw new ArgumentException ();
  27. this.reader = reader;
  28. entityHandling = EntityHandling.ExpandEntities;
  29. namespaces = true;
  30. validationType = ValidationType.Auto;
  31. }
  32. [MonoTODO]
  33. public XmlValidatingReader (Stream xmlFragment, XmlNodeType fragType, XmlParserContext context)
  34. : this (new XmlTextReader (xmlFragment))
  35. {
  36. }
  37. public XmlValidatingReader (string xmlFragment, XmlNodeType fragType, XmlParserContext context)
  38. : this (new XmlTextReader (xmlFragment))
  39. {
  40. }
  41. #endregion // Constructors
  42. #region Properties
  43. public override int AttributeCount {
  44. [MonoTODO]
  45. get { throw new NotImplementedException (); }
  46. }
  47. public override string BaseURI {
  48. [MonoTODO]
  49. get { throw new NotImplementedException (); }
  50. }
  51. public override bool CanResolveEntity {
  52. get { return true; }
  53. }
  54. public override int Depth {
  55. [MonoTODO]
  56. get { throw new NotImplementedException (); }
  57. }
  58. public Encoding Encoding {
  59. [MonoTODO]
  60. get { throw new NotImplementedException (); }
  61. }
  62. public EntityHandling EntityHandling {
  63. get { return entityHandling; }
  64. set { entityHandling = value; }
  65. }
  66. public override bool EOF {
  67. [MonoTODO]
  68. get { throw new NotImplementedException (); }
  69. }
  70. public override bool HasValue {
  71. [MonoTODO]
  72. get { throw new NotImplementedException (); }
  73. }
  74. public override bool IsDefault {
  75. [MonoTODO]
  76. get { throw new NotImplementedException (); }
  77. }
  78. public override bool IsEmptyElement {
  79. [MonoTODO]
  80. get { throw new NotImplementedException (); }
  81. }
  82. public override string this [int i] {
  83. [MonoTODO]
  84. get { throw new NotImplementedException (); }
  85. }
  86. public override string this [string name] {
  87. [MonoTODO]
  88. get { throw new NotImplementedException (); }
  89. }
  90. public override string this [string localName, string namespaceName] {
  91. [MonoTODO]
  92. get { throw new NotImplementedException (); }
  93. }
  94. int IXmlLineInfo.LineNumber {
  95. [MonoTODO]
  96. get { throw new NotImplementedException (); }
  97. }
  98. int IXmlLineInfo.LinePosition {
  99. [MonoTODO]
  100. get { throw new NotImplementedException (); }
  101. }
  102. public override string LocalName {
  103. [MonoTODO]
  104. get { throw new NotImplementedException (); }
  105. }
  106. public override string Name {
  107. [MonoTODO]
  108. get { throw new NotImplementedException (); }
  109. }
  110. public bool Namespaces {
  111. get { return namespaces; }
  112. set { namespaces = value; }
  113. }
  114. public override string NamespaceURI {
  115. [MonoTODO]
  116. get { throw new NotImplementedException (); }
  117. }
  118. public override XmlNameTable NameTable {
  119. [MonoTODO]
  120. get { throw new NotImplementedException (); }
  121. }
  122. public override XmlNodeType NodeType {
  123. [MonoTODO]
  124. get { throw new NotImplementedException (); }
  125. }
  126. public override string Prefix {
  127. [MonoTODO]
  128. get { throw new NotImplementedException (); }
  129. }
  130. public override char QuoteChar {
  131. [MonoTODO]
  132. get { throw new NotImplementedException (); }
  133. }
  134. public XmlReader Reader {
  135. get { return reader; }
  136. }
  137. public override ReadState ReadState {
  138. [MonoTODO]
  139. get { throw new NotImplementedException (); }
  140. }
  141. public XmlSchemaCollection Schemas {
  142. [MonoTODO]
  143. get { throw new NotImplementedException (); }
  144. }
  145. public object SchemaType {
  146. [MonoTODO]
  147. get { throw new NotImplementedException (); }
  148. }
  149. public ValidationType ValidationType {
  150. get { return validationType; }
  151. [MonoTODO ("Need to check for exception.")]
  152. set { validationType = value; }
  153. }
  154. public override string Value {
  155. [MonoTODO]
  156. get { throw new NotImplementedException (); }
  157. }
  158. public override string XmlLang {
  159. [MonoTODO]
  160. get { throw new NotImplementedException (); }
  161. }
  162. public XmlResolver XmlResolver {
  163. [MonoTODO]
  164. set { throw new NotImplementedException (); }
  165. }
  166. public override XmlSpace XmlSpace {
  167. [MonoTODO]
  168. get { throw new NotImplementedException (); }
  169. }
  170. #endregion // Properties
  171. #region Methods
  172. [MonoTODO]
  173. public override void Close ()
  174. {
  175. throw new NotImplementedException ();
  176. }
  177. [MonoTODO]
  178. public override string GetAttribute (int i)
  179. {
  180. throw new NotImplementedException ();
  181. }
  182. [MonoTODO]
  183. public override string GetAttribute (string name)
  184. {
  185. throw new NotImplementedException ();
  186. }
  187. [MonoTODO]
  188. public override string GetAttribute (string localName, string namespaceName)
  189. {
  190. throw new NotImplementedException ();
  191. }
  192. [MonoTODO]
  193. bool IXmlLineInfo.HasLineInfo ()
  194. {
  195. throw new NotImplementedException ();
  196. }
  197. [MonoTODO]
  198. public override string LookupNamespace (string prefix)
  199. {
  200. throw new NotImplementedException ();
  201. }
  202. [MonoTODO]
  203. public override void MoveToAttribute (int i)
  204. {
  205. throw new NotImplementedException ();
  206. }
  207. [MonoTODO]
  208. public override bool MoveToAttribute (string name)
  209. {
  210. throw new NotImplementedException ();
  211. }
  212. [MonoTODO]
  213. public override bool MoveToAttribute (string localName, string namespaceName)
  214. {
  215. throw new NotImplementedException ();
  216. }
  217. [MonoTODO]
  218. public override bool MoveToElement ()
  219. {
  220. throw new NotImplementedException ();
  221. }
  222. [MonoTODO]
  223. public override bool MoveToFirstAttribute ()
  224. {
  225. throw new NotImplementedException ();
  226. }
  227. [MonoTODO]
  228. public override bool MoveToNextAttribute ()
  229. {
  230. throw new NotImplementedException ();
  231. }
  232. [MonoTODO]
  233. public override bool Read ()
  234. {
  235. throw new NotImplementedException ();
  236. }
  237. [MonoTODO]
  238. public override bool ReadAttributeValue ()
  239. {
  240. throw new NotImplementedException ();
  241. }
  242. [MonoTODO]
  243. public override string ReadInnerXml ()
  244. {
  245. throw new NotImplementedException ();
  246. }
  247. [MonoTODO]
  248. public override string ReadOuterXml ()
  249. {
  250. throw new NotImplementedException ();
  251. }
  252. [MonoTODO]
  253. public override string ReadString ()
  254. {
  255. throw new NotImplementedException ();
  256. }
  257. [MonoTODO]
  258. public object ReadTypedValue ()
  259. {
  260. throw new NotImplementedException ();
  261. }
  262. [MonoTODO]
  263. public override void ResolveEntity ()
  264. {
  265. throw new NotImplementedException ();
  266. }
  267. #endregion // Methods
  268. #region Events and Delegates
  269. public event ValidationEventHandler ValidationEventHandler;
  270. #endregion // Events and Delegates
  271. }
  272. }