XmlSerializationReader.cs 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. //
  2. // System.Xml.Serialization.XmlSerializationReader.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2002
  8. //
  9. using System;
  10. using System.Collections;
  11. using System.Xml;
  12. namespace System.Xml.Serialization {
  13. public abstract class XmlSerializationReader {
  14. #region Fields
  15. XmlDocument document;
  16. XmlReader reader;
  17. #endregion
  18. [MonoTODO]
  19. protected XmlSerializationReader ()
  20. {
  21. throw new NotImplementedException ();
  22. }
  23. protected XmlDocument Document {
  24. get { return document; }
  25. }
  26. protected XmlReader Reader {
  27. get { return reader; }
  28. }
  29. #region Methods
  30. [MonoTODO ("Implement")]
  31. protected void AddFixup (XmlSerializationReader.CollectionFixup fixup)
  32. {
  33. throw new NotImplementedException ();
  34. }
  35. [MonoTODO ("Implement")]
  36. protected void AddFixup (XmlSerializationReader.Fixup fixup)
  37. {
  38. throw new NotImplementedException ();
  39. }
  40. [MonoTODO ("Implement")]
  41. protected void AddReadCallback (string name, string ns, Type type, XmlSerializationReadCallback read)
  42. {
  43. throw new NotImplementedException ();
  44. }
  45. [MonoTODO ("Implement")]
  46. protected void AddTarget (string id, object o)
  47. {
  48. throw new NotImplementedException ();
  49. }
  50. [MonoTODO ("Implement")]
  51. protected Exception CreateAbstractTypeException (string name, string ns)
  52. {
  53. throw new NotImplementedException ();
  54. }
  55. [MonoTODO ("Implement")]
  56. protected Exception CreateInvalidCastException (string name, object value)
  57. {
  58. throw new NotImplementedException ();
  59. }
  60. [MonoTODO ("Implement")]
  61. protected Exception CreateReadOnlyCollectionException (string name)
  62. {
  63. throw new NotImplementedException ();
  64. }
  65. [MonoTODO ("Implement")]
  66. protected Exception CreateUnknownConstantException (string value, Type enumType)
  67. {
  68. throw new NotImplementedException ();
  69. }
  70. [MonoTODO ("Implement")]
  71. protected Exception CreateUnknownNodeException ()
  72. {
  73. throw new NotImplementedException ();
  74. }
  75. [MonoTODO ("Implement")]
  76. protected Exception CreateUnknownTypeException (XmlQualifiedName type)
  77. {
  78. throw new NotImplementedException ();
  79. }
  80. [MonoTODO ("Implement")]
  81. protected Array EnsureArrayIndex (Array a, int index, Type elementType)
  82. {
  83. throw new NotImplementedException ();
  84. }
  85. [MonoTODO ("Implement")]
  86. protected void FixupArrayRefs (object fixup)
  87. {
  88. throw new NotImplementedException ();
  89. }
  90. [MonoTODO ("Implement")]
  91. protected int GetArrayLength (string name, string ns)
  92. {
  93. throw new NotImplementedException ();
  94. }
  95. [MonoTODO ("Implement")]
  96. protected bool GetNullAttr ()
  97. {
  98. throw new NotImplementedException ();
  99. }
  100. [MonoTODO ("Implement")]
  101. protected object GetTarget (string id)
  102. {
  103. throw new NotImplementedException ();
  104. }
  105. [MonoTODO ("Implement")]
  106. protected XmlQualifiedName GetXsiType ()
  107. {
  108. throw new NotImplementedException ();
  109. }
  110. protected abstract void InitCallbacks ();
  111. protected abstract void InitIDs ();
  112. [MonoTODO ("Implement")]
  113. protected bool IsXmlnsAttribute (string name)
  114. {
  115. throw new NotImplementedException ();
  116. }
  117. [MonoTODO ("Implement")]
  118. protected void ParseWsdlArrayType (XmlAttribute attr)
  119. {
  120. throw new NotImplementedException ();
  121. }
  122. [MonoTODO ("Implement")]
  123. protected XmlQualifiedName ReadElementQualifiedName ()
  124. {
  125. throw new NotImplementedException ();
  126. }
  127. [MonoTODO ("Implement")]
  128. protected void ReadEndElement ()
  129. {
  130. throw new NotImplementedException ();
  131. }
  132. [MonoTODO ("Implement")]
  133. protected bool ReadNull ()
  134. {
  135. throw new NotImplementedException ();
  136. }
  137. [MonoTODO ("Implement")]
  138. protected XmlQualifiedName ReadNullableQualifiedName ()
  139. {
  140. throw new NotImplementedException ();
  141. }
  142. [MonoTODO ("Implement")]
  143. protected string ReadNullableString ()
  144. {
  145. throw new NotImplementedException ();
  146. }
  147. [MonoTODO ("Implement")]
  148. protected bool ReadReference (out string fixupReference)
  149. {
  150. throw new NotImplementedException ();
  151. }
  152. [MonoTODO ("Implement")]
  153. protected object ReadReferencedElement ()
  154. {
  155. throw new NotImplementedException ();
  156. }
  157. [MonoTODO ("Implement")]
  158. protected object ReadReferencedElement (string name, string ns)
  159. {
  160. throw new NotImplementedException ();
  161. }
  162. [MonoTODO ("Implement")]
  163. protected void ReadReferencedElements ()
  164. {
  165. throw new NotImplementedException ();
  166. }
  167. [MonoTODO ("Implement")]
  168. protected object ReadReferencingElement (out string fixupReference)
  169. {
  170. throw new NotImplementedException ();
  171. }
  172. [MonoTODO ("Implement")]
  173. protected object ReadReferencingElement (string name, string ns, out string fixupReference)
  174. {
  175. throw new NotImplementedException ();
  176. }
  177. [MonoTODO ("Implement")]
  178. protected object ReadReferencingElement (string name, string ns, bool elementCanBeType, out string fixupReference)
  179. {
  180. throw new NotImplementedException ();
  181. }
  182. [MonoTODO ("Implement")]
  183. protected IXmlSerializable ReadSerializable (IXmlSerializable serializable)
  184. {
  185. throw new NotImplementedException ();
  186. }
  187. [MonoTODO ("Implement")]
  188. protected string ReadString (string value)
  189. {
  190. throw new NotImplementedException ();
  191. }
  192. [MonoTODO ("Implement")]
  193. protected object ReadTypedPrimitive (XmlQualifiedName type)
  194. {
  195. throw new NotImplementedException ();
  196. }
  197. [MonoTODO ("Implement")]
  198. protected XmlNode ReadXmlNode (bool wrapped)
  199. {
  200. throw new NotImplementedException ();
  201. }
  202. [MonoTODO ("Implement")]
  203. protected void Referenced (object o)
  204. {
  205. throw new NotImplementedException ();
  206. }
  207. [MonoTODO ("Implement")]
  208. protected Array ShrinkArray (Array a, int length, Type elementType, bool isNullable)
  209. {
  210. throw new NotImplementedException ();
  211. }
  212. [MonoTODO ("Implement")]
  213. protected byte[] ToByteArrayBase64 (bool isNull)
  214. {
  215. throw new NotImplementedException ();
  216. }
  217. [MonoTODO ("Implement")]
  218. protected static byte[] ToByteArrayBase64 (string value)
  219. {
  220. throw new NotImplementedException ();
  221. }
  222. [MonoTODO ("Implement")]
  223. protected byte[] ToByteArrayHex (bool isNull)
  224. {
  225. throw new NotImplementedException ();
  226. }
  227. [MonoTODO ("Implement")]
  228. protected static byte[] ToByteArrayHex (string value)
  229. {
  230. throw new NotImplementedException ();
  231. }
  232. [MonoTODO ("Implement")]
  233. protected static char ToChar (string value)
  234. {
  235. throw new NotImplementedException ();
  236. }
  237. [MonoTODO ("Implement")]
  238. protected static DateTime ToDate (string value)
  239. {
  240. throw new NotImplementedException ();
  241. }
  242. [MonoTODO ("Implement")]
  243. protected static DateTime ToDateTime (string value)
  244. {
  245. throw new NotImplementedException ();
  246. }
  247. [MonoTODO ("Implement")]
  248. protected static long ToEnum (string value, Hashtable h, string typeName)
  249. {
  250. throw new NotImplementedException ();
  251. }
  252. [MonoTODO ("Implement")]
  253. protected static DateTime ToTime (string value)
  254. {
  255. throw new NotImplementedException ();
  256. }
  257. [MonoTODO ("Implement")]
  258. protected static string ToXmlName (string value)
  259. {
  260. throw new NotImplementedException ();
  261. }
  262. [MonoTODO ("Implement")]
  263. protected static string ToXmlNCName (string value)
  264. {
  265. throw new NotImplementedException ();
  266. }
  267. [MonoTODO ("Implement")]
  268. protected static string ToXmlNmToken (string value)
  269. {
  270. throw new NotImplementedException ();
  271. }
  272. [MonoTODO ("Implement")]
  273. protected static string ToXmlNmTokens (string value)
  274. {
  275. throw new NotImplementedException ();
  276. }
  277. [MonoTODO ("Implement")]
  278. protected XmlQualifiedName ToXmlQualifiedName (string value)
  279. {
  280. throw new NotImplementedException ();
  281. }
  282. [MonoTODO ("Implement")]
  283. protected void UnknownAttribute (object o, XmlAttribute attr)
  284. {
  285. throw new NotImplementedException ();
  286. }
  287. [MonoTODO ("Implement")]
  288. protected void UnknownElement (object o, XmlElement elem)
  289. {
  290. throw new NotImplementedException ();
  291. }
  292. [MonoTODO ("Implement")]
  293. protected void UnknownNode (object o)
  294. {
  295. throw new NotImplementedException ();
  296. }
  297. [MonoTODO ("Implement")]
  298. protected void UnreferencedObject (string id, object o)
  299. {
  300. throw new NotImplementedException ();
  301. }
  302. #endregion // Methods
  303. protected class CollectionFixup {
  304. #region Fields
  305. XmlSerializationCollectionFixupCallback callback;
  306. object collection;
  307. object collectionItems;
  308. #endregion // Fields
  309. #region Constructors
  310. [MonoTODO]
  311. public CollectionFixup (object collection, XmlSerializationCollectionFixupCallback callback, object collectionItems)
  312. {
  313. this.callback = callback;
  314. this.collection = collection;
  315. this.collectionItems = collectionItems;
  316. }
  317. #endregion // Constructors
  318. #region Properties
  319. public XmlSerializationCollectionFixupCallback Callback {
  320. get { return callback; }
  321. }
  322. public object Collection {
  323. get { return collection; }
  324. }
  325. public object CollectionItems {
  326. get { return collectionItems; }
  327. }
  328. #endregion // Properties
  329. }
  330. protected class Fixup {
  331. #region Fields
  332. object source;
  333. string[] ids;
  334. XmlSerializationFixupCallback callback;
  335. #endregion // Fields
  336. #region Constructors
  337. [MonoTODO]
  338. public Fixup (object o, XmlSerializationFixupCallback callback, int count)
  339. {
  340. this.callback = callback;
  341. }
  342. [MonoTODO]
  343. public Fixup (object o, XmlSerializationFixupCallback callback, string[] ids)
  344. {
  345. this.callback = callback;
  346. }
  347. #endregion // Constructors
  348. #region Properties
  349. public XmlSerializationFixupCallback Callback {
  350. get { return callback; }
  351. }
  352. public string[] Ids {
  353. get { return ids; }
  354. }
  355. public object Source {
  356. get { return source; }
  357. set { source = value; }
  358. }
  359. #endregion // Properties
  360. }
  361. }
  362. }