DbCommandSet.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // System.Data.Common.DbCommandSet
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2003
  8. //
  9. #if NET_1_2
  10. using System.ComponentModel;
  11. using System.Data;
  12. namespace System.Data.Common {
  13. public abstract class DbCommandSet : IDisposable
  14. {
  15. #region Constructors
  16. protected DbCommandSet ()
  17. {
  18. }
  19. #endregion // Constructors
  20. #region Properties
  21. public abstract int CommandCount { get; }
  22. public abstract int CommandTimeout { get; set; }
  23. public DbConnection Connection {
  24. get { return DbConnection; }
  25. set { DbConnection = value; }
  26. }
  27. protected abstract DbConnection DbConnection { get; set; }
  28. protected abstract DbTransaction DbTransaction { get; set; }
  29. public DbTransaction Transaction {
  30. get { return DbTransaction; }
  31. }
  32. #endregion // Properties
  33. #region Methods
  34. public abstract void Append (DbCommand command);
  35. public abstract void Cancel ();
  36. public abstract void Clear ();
  37. public abstract void CopyToParameter (int commandIndex, int parameterIndex, DbParameter destination);
  38. public abstract void CopyToParameter (int commandIndex, string parameterName, DbParameter destination);
  39. public abstract void CopyToParameterCollection (int commandIndex, DbParameterCollection destination);
  40. public abstract void Dispose ();
  41. public abstract DbDataReader ExecuteDbDataReader (CommandBehavior behavior);
  42. public abstract int ExecuteNonQuery ();
  43. [MonoTODO]
  44. public DbDataReader ExecuteReader ()
  45. {
  46. throw new NotImplementedException ();
  47. }
  48. [MonoTODO]
  49. public DbDataReader ExecuteReader (CommandBehavior behavior)
  50. {
  51. throw new NotImplementedException ();
  52. }
  53. public abstract int GetParameterCount (int commandIndex);
  54. #endregion // Methods
  55. }
  56. }
  57. #endif