SqlCommandBuilder.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. //
  2. // System.Data.SqlClient.SqlCommandBuilder.cs
  3. //
  4. // Author:
  5. // Rodrigo Moya ([email protected])
  6. // Daniel Morgan ([email protected])
  7. // Tim Coleman ([email protected])
  8. //
  9. // (C) Ximian, Inc 2002
  10. // Copyright (C) Tim Coleman, 2002
  11. //
  12. using System;
  13. using System.Data;
  14. using System.ComponentModel;
  15. namespace System.Data.SqlClient {
  16. /// <summary>
  17. /// Builder of one command
  18. /// that will be used in manipulating a table for
  19. /// a DataSet that is assoicated with a database.
  20. /// </summary>
  21. public sealed class SqlCommandBuilder : Component
  22. {
  23. #region Fields
  24. string quotePrefix;
  25. string quoteSuffix;
  26. SqlDataAdapter adapter;
  27. #endregion // Fields
  28. #region Constructors
  29. public SqlCommandBuilder ()
  30. : this (null)
  31. {
  32. }
  33. public SqlCommandBuilder (SqlDataAdapter adapter)
  34. {
  35. this.adapter = adapter;
  36. this.quotePrefix = String.Empty;
  37. this.quoteSuffix = String.Empty;
  38. }
  39. #endregion // Constructors
  40. #region Properties
  41. [DataSysDescription ("The DataAdapter for which to automatically generator SqlCommands.")]
  42. [DefaultValue (null)]
  43. public SqlDataAdapter DataAdapter {
  44. get { return adapter; }
  45. set {
  46. if (adapter != null)
  47. adapter.RowUpdating -= new SqlRowUpdatingEventHandler (RowUpdatingHandler);
  48. adapter = value;
  49. adapter.RowUpdating += new SqlRowUpdatingEventHandler (RowUpdatingHandler);
  50. }
  51. }
  52. [Browsable (false)]
  53. [DataSysDescription ("The character used in a text command as the opening quote for quoting identifiers that contain special characters.")]
  54. [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
  55. public string QuotePrefix {
  56. get { return quotePrefix; }
  57. set { quotePrefix = value; }
  58. }
  59. [Browsable (false)]
  60. [DataSysDescription ("The character used in a text command as the closing quote for quoting identifiers that contain special characters.")]
  61. [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
  62. public string QuoteSuffix {
  63. get { return quoteSuffix; }
  64. set { quoteSuffix = value; }
  65. }
  66. #endregion // Properties
  67. #region Methods
  68. [MonoTODO]
  69. public static void DeriveParameters (SqlCommand command)
  70. {
  71. throw new NotImplementedException ();
  72. }
  73. [MonoTODO]
  74. public SqlCommand GetDeleteCommand ()
  75. {
  76. throw new NotImplementedException ();
  77. }
  78. [MonoTODO]
  79. public SqlCommand GetInsertCommand ()
  80. {
  81. throw new NotImplementedException ();
  82. }
  83. [MonoTODO]
  84. public SqlCommand GetUpdateCommand ()
  85. {
  86. throw new NotImplementedException ();
  87. }
  88. [MonoTODO]
  89. public void RefreshSchema ()
  90. {
  91. throw new NotImplementedException ();
  92. }
  93. [MonoTODO]
  94. private void RowUpdatingHandler (object sender, SqlRowUpdatingEventArgs e)
  95. {
  96. throw new NotImplementedException ();
  97. }
  98. [MonoTODO]
  99. protected override void Dispose (bool disposing)
  100. {
  101. throw new NotImplementedException ();
  102. }
  103. #endregion // Methods
  104. }
  105. }