DbCommandBase.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. //
  2. // System.Data.ProviderBase.DbCommandBase
  3. //
  4. // Author:
  5. // Tim Coleman ([email protected])
  6. //
  7. // Copyright (C) Tim Coleman, 2003
  8. //
  9. #if NET_1_2
  10. using System.Data.Common;
  11. namespace System.Data.ProviderBase {
  12. public abstract class DbCommandBase : DbCommand
  13. {
  14. #region Fields
  15. string commandText;
  16. int commandTimeout;
  17. CommandType commandType;
  18. bool designTimeVisible;
  19. UpdateRowSource updatedRowSource;
  20. #endregion // Fields
  21. #region Constructors
  22. protected DbCommandBase ()
  23. {
  24. CommandText = String.Empty;
  25. CommandTimeout = 30;
  26. CommandType = CommandType.Text;
  27. DesignTimeVisible = true;
  28. UpdatedRowSource = UpdateRowSource.Both;
  29. }
  30. protected DbCommandBase (DbCommandBase from)
  31. {
  32. }
  33. #endregion // Constructors
  34. #region Properties
  35. public override string CommandText {
  36. get { return commandText; }
  37. set { commandText = value; }
  38. }
  39. public override int CommandTimeout {
  40. get { return commandTimeout; }
  41. set { commandTimeout = value; }
  42. }
  43. public override CommandType CommandType {
  44. get { return commandType; }
  45. set { commandType = value; }
  46. }
  47. public override bool DesignTimeVisible {
  48. get { return designTimeVisible; }
  49. set { designTimeVisible = value; }
  50. }
  51. public override UpdateRowSource UpdatedRowSource {
  52. get { return updatedRowSource; }
  53. set { updatedRowSource = value; }
  54. }
  55. #endregion // Properties
  56. #region Methods
  57. [MonoTODO]
  58. public override void Cancel ()
  59. {
  60. throw new NotImplementedException ();
  61. }
  62. [MonoTODO]
  63. public override int ExecuteNonQuery ()
  64. {
  65. DbDataReader reader = ExecuteReader ();
  66. reader.Close ();
  67. return reader.RecordsAffected;
  68. }
  69. [MonoTODO]
  70. public override object ExecuteScalar ()
  71. {
  72. throw new NotImplementedException ();
  73. }
  74. [MonoTODO]
  75. public override void Prepare ()
  76. {
  77. throw new NotImplementedException ();
  78. }
  79. [MonoTODO]
  80. public virtual void PropertyChanging ()
  81. {
  82. throw new NotImplementedException ();
  83. }
  84. [MonoTODO]
  85. public virtual void ResetCommandTimeout ()
  86. {
  87. throw new NotImplementedException ();
  88. }
  89. [MonoTODO]
  90. protected internal static void SetInputParameterValues (DbCommand command, object[] inputParameterValues)
  91. {
  92. throw new NotImplementedException ();
  93. }
  94. #endregion // Methods
  95. }
  96. }
  97. #endif