2
0

DbDataReaderBase.cs 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. //
  2. // System.Data.ProviderBase.DbDataReaderBase
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. // Boris Kirzner ([email protected])
  7. //
  8. // Copyright (C) Tim Coleman, 2003
  9. //
  10. //
  11. // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
  12. // (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
  13. //
  14. // Permission is hereby granted, free of charge, to any person obtaining
  15. // a copy of this software and associated documentation files (the
  16. // "Software"), to deal in the Software without restriction, including
  17. // without limitation the rights to use, copy, modify, merge, publish,
  18. // distribute, sublicense, and/or sell copies of the Software, and to
  19. // permit persons to whom the Software is furnished to do so, subject to
  20. // the following conditions:
  21. //
  22. // The above copyright notice and this permission notice shall be
  23. // included in all copies or substantial portions of the Software.
  24. //
  25. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  26. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  27. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  28. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  29. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  30. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  31. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  32. //
  33. #if NET_2_0 || TARGET_JVM
  34. using System.Collections;
  35. using System.Data.Common;
  36. using System.Runtime.InteropServices;
  37. namespace System.Data.ProviderBase {
  38. public abstract class DbDataReaderBase : DbDataReader
  39. {
  40. #region Fields
  41. CommandBehavior behavior;
  42. #endregion // Fields
  43. #region Constructors
  44. protected DbDataReaderBase (CommandBehavior behavior)
  45. {
  46. this.behavior = behavior;
  47. }
  48. #endregion // Constructors
  49. #region Properties
  50. protected CommandBehavior CommandBehavior {
  51. get { return behavior; }
  52. }
  53. public override int Depth {
  54. // default value to be overriden by user
  55. get { return 0; }
  56. }
  57. [MonoTODO]
  58. public override int FieldCount {
  59. get { throw new NotImplementedException (); }
  60. }
  61. [MonoTODO]
  62. public override bool HasRows {
  63. get { throw new NotImplementedException (); }
  64. }
  65. [MonoTODO]
  66. public override bool IsClosed {
  67. get { throw new NotImplementedException (); }
  68. }
  69. #if NET_2_0
  70. protected abstract bool IsValidRow { get; }
  71. #endif
  72. [MonoTODO]
  73. public override object this [[Optional] int index] {
  74. get { throw new NotImplementedException (); }
  75. }
  76. [MonoTODO]
  77. public override object this [[Optional] string columnName] {
  78. get { throw new NotImplementedException (); }
  79. }
  80. [MonoTODO]
  81. public override int RecordsAffected {
  82. get { throw new NotImplementedException (); }
  83. }
  84. #endregion // Properties
  85. #region Methods
  86. [MonoTODO]
  87. protected void AssertReaderHasColumns ()
  88. {
  89. throw new NotImplementedException ();
  90. }
  91. [MonoTODO]
  92. protected void AssertReaderHasData ()
  93. {
  94. throw new NotImplementedException ();
  95. }
  96. [MonoTODO]
  97. protected void AssertReaderIsOpen (string methodName)
  98. {
  99. throw new NotImplementedException ();
  100. }
  101. [MonoTODO]
  102. public override void Close ()
  103. {
  104. throw new NotImplementedException ();
  105. }
  106. [MonoTODO]
  107. protected static DataTable CreateSchemaTable ()
  108. {
  109. throw new NotImplementedException ();
  110. }
  111. public override void Dispose ()
  112. {
  113. Close ();
  114. }
  115. [MonoTODO]
  116. protected virtual void FillSchemaTable (DataTable dataTable)
  117. {
  118. throw new NotImplementedException ();
  119. }
  120. [MonoTODO]
  121. public override bool GetBoolean (int ordinal)
  122. {
  123. throw new NotImplementedException ();
  124. }
  125. [MonoTODO]
  126. public override byte GetByte (int ordinal)
  127. {
  128. throw new NotImplementedException ();
  129. }
  130. [MonoTODO]
  131. public override long GetBytes (int ordinal, long fieldoffset, byte[] buffer, int bufferoffset, int length)
  132. {
  133. throw new NotImplementedException ();
  134. }
  135. [MonoTODO]
  136. public override char GetChar (int ordinal)
  137. {
  138. throw new NotImplementedException ();
  139. }
  140. [MonoTODO]
  141. public override long GetChars (int ordinal, long fieldoffset, char[] buffer, int bufferoffset, int length)
  142. {
  143. throw new NotImplementedException ();
  144. }
  145. [MonoTODO]
  146. public override string GetDataTypeName (int ordinal)
  147. {
  148. throw new NotImplementedException ();
  149. }
  150. [MonoTODO]
  151. public override DateTime GetDateTime (int ordinal)
  152. {
  153. throw new NotImplementedException ();
  154. }
  155. [MonoTODO]
  156. public override decimal GetDecimal (int ordinal)
  157. {
  158. throw new NotImplementedException ();
  159. }
  160. [MonoTODO]
  161. public override double GetDouble (int ordinal)
  162. {
  163. throw new NotImplementedException ();
  164. }
  165. public override IEnumerator GetEnumerator ()
  166. {
  167. bool closeReader = (CommandBehavior & CommandBehavior.CloseConnection) != 0;
  168. return new DbEnumerator (this , closeReader);
  169. }
  170. [MonoTODO]
  171. public override Type GetFieldType (int ordinal)
  172. {
  173. throw new NotImplementedException ();
  174. }
  175. [MonoTODO]
  176. public override float GetFloat (int ordinal)
  177. {
  178. throw new NotImplementedException ();
  179. }
  180. [MonoTODO]
  181. public override Guid GetGuid (int ordinal)
  182. {
  183. throw new NotImplementedException ();
  184. }
  185. [MonoTODO]
  186. public override short GetInt16 (int ordinal)
  187. {
  188. throw new NotImplementedException ();
  189. }
  190. [MonoTODO]
  191. public override int GetInt32 (int ordinal)
  192. {
  193. throw new NotImplementedException ();
  194. }
  195. [MonoTODO]
  196. public override long GetInt64 (int ordinal)
  197. {
  198. throw new NotImplementedException ();
  199. }
  200. [MonoTODO]
  201. public override string GetName (int ordinal)
  202. {
  203. throw new NotImplementedException ();
  204. }
  205. [MonoTODO]
  206. public override int GetOrdinal (string name)
  207. {
  208. throw new NotImplementedException ();
  209. }
  210. [MonoTODO]
  211. public override DataTable GetSchemaTable ()
  212. {
  213. throw new NotImplementedException ();
  214. }
  215. [MonoTODO]
  216. public override string GetString (int ordinal)
  217. {
  218. throw new NotImplementedException ();
  219. }
  220. [MonoTODO]
  221. public override object GetValue (int ordinal)
  222. {
  223. throw new NotImplementedException ();
  224. }
  225. [MonoTODO]
  226. public override int GetValues (object[] values)
  227. {
  228. throw new NotImplementedException ();
  229. }
  230. [MonoTODO]
  231. protected bool IsCommandBehavior (CommandBehavior condition)
  232. {
  233. throw new NotImplementedException ();
  234. }
  235. [MonoTODO]
  236. public override bool IsDBNull (int ordinal)
  237. {
  238. throw new NotImplementedException ();
  239. }
  240. [MonoTODO]
  241. public override bool NextResult ()
  242. {
  243. throw new NotImplementedException ();
  244. }
  245. [MonoTODO]
  246. public override bool Read ()
  247. {
  248. throw new NotImplementedException ();
  249. }
  250. #endregion // Methods
  251. }
  252. }
  253. #endif