DbDataReader.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. //
  2. // System.Data.Common.DbDataReader.cs
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2003
  8. //
  9. #if NET_1_2
  10. using System.Collections;
  11. using System.Data;
  12. namespace System.Data.Common {
  13. public abstract class DbDataReader : MarshalByRefObject, IDataReader, IDataReader2, IDataRecord, IDataRecord2, IDisposable, IEnumerable
  14. {
  15. #region Constructors
  16. protected DbDataReader ()
  17. {
  18. }
  19. #endregion // Constructors
  20. #region Properties
  21. public abstract int Depth { get; }
  22. public abstract int FieldCount { get; }
  23. public abstract bool HasRows { get; }
  24. public abstract bool IsClosed { get; }
  25. public abstract object this [int index] { get; }
  26. public abstract object this [string name] { get; }
  27. public abstract int RecordsAffected { get; }
  28. public abstract int VisibleFieldCount { get; }
  29. #endregion // Properties
  30. #region Methods
  31. public abstract void Close ();
  32. public abstract void Dispose ();
  33. public abstract bool GetBoolean (int i);
  34. public abstract byte GetByte (int i);
  35. public abstract long GetBytes (int i, long fieldOffset, byte[] buffer, int bufferOffset, int length);
  36. public abstract char GetChar (int i);
  37. public abstract long GetChars (int i, long dataIndex, char[] buffer, int bufferIndex, int length);
  38. [MonoTODO]
  39. public DbDataReader GetData (int i)
  40. {
  41. throw new NotImplementedException ();
  42. }
  43. public abstract string GetDataTypeName (int i);
  44. public abstract DateTime GetDateTime (int i);
  45. public abstract decimal GetDecimal (int i);
  46. public abstract double GetDouble (int i);
  47. public abstract IEnumerator GetEnumerator ();
  48. public abstract Type GetFieldProviderSpecificType (int i);
  49. public abstract Type GetFieldType (int i);
  50. public abstract float GetFloat (int i);
  51. public abstract Guid GetGuid (int i);
  52. public abstract short GetInt16 (int i);
  53. public abstract int GetInt32 (int i);
  54. public abstract long GetInt64 (int i);
  55. public abstract string GetName (int i);
  56. public abstract int GetOrdinal (string name);
  57. public abstract object GetProviderSpecificValue (int i);
  58. public abstract int GetProviderSpecificValues (object[] values);
  59. public abstract DataTable GetSchemaTable ();
  60. public abstract string GetString (int i);
  61. public abstract object GetValue (int i);
  62. public abstract int GetValues (object[] values);
  63. IDataReader IDataRecord.GetData (int i)
  64. {
  65. return ((IDataReader) this).GetData (i);
  66. }
  67. public abstract bool IsDBNull (int i);
  68. public abstract bool NextResult ();
  69. public abstract bool Read ();
  70. #endregion // Methods
  71. }
  72. }
  73. #endif // NET_1_2