DbConnectionBase.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. //
  2. // System.Data.ProviderBase.DbConnectionBase
  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. using System.EnterpriseServices;
  12. namespace System.Data.ProviderBase {
  13. public abstract class DbConnectionBase : DbConnection
  14. {
  15. #region Fields
  16. DbConnectionFactory connectionFactory;
  17. DbConnectionString connectionOptions;
  18. string connectionString;
  19. #endregion // Fields
  20. #region Constructors
  21. protected DbConnectionBase (DbConnectionBase connection)
  22. : this (connection.ConnectionFactory)
  23. {
  24. }
  25. protected DbConnectionBase (DbConnectionFactory connectionFactory)
  26. {
  27. this.connectionFactory = connectionFactory;
  28. }
  29. #endregion // Constructors
  30. #region Properties
  31. [MonoTODO]
  32. protected int CloseCount {
  33. get { throw new NotImplementedException (); }
  34. }
  35. protected internal DbConnectionFactory ConnectionFactory {
  36. get { return connectionFactory; }
  37. }
  38. protected internal DbConnectionString ConnectionOptions {
  39. get { return connectionOptions; }
  40. }
  41. [MonoTODO]
  42. public override string ConnectionString {
  43. get { return connectionString; }
  44. set {
  45. connectionOptions = ConnectionFactory.CreateConnectionOptionsInternal (value);
  46. connectionString = value;
  47. }
  48. }
  49. [MonoTODO]
  50. public override int ConnectionTimeout {
  51. get { throw new NotImplementedException (); }
  52. }
  53. [MonoTODO]
  54. protected virtual int ConnectionTimeoutInternal {
  55. get { throw new NotImplementedException (); }
  56. }
  57. [MonoTODO]
  58. public override string Database {
  59. get { throw new NotImplementedException (); }
  60. }
  61. [MonoTODO]
  62. public override string DataSource {
  63. get { throw new NotImplementedException (); }
  64. }
  65. [MonoTODO]
  66. protected internal DbConnectionInternal InnerConnection {
  67. get { throw new NotImplementedException (); }
  68. }
  69. [MonoTODO]
  70. public override string ServerVersion {
  71. get { throw new NotImplementedException (); }
  72. }
  73. [MonoTODO]
  74. public override ConnectionState State {
  75. get { throw new NotImplementedException (); }
  76. }
  77. #endregion // Properties
  78. #region Events
  79. public event StateChangeEventHandler StateChange;
  80. #endregion // Events
  81. #region Methods
  82. [MonoTODO]
  83. protected override DbTransaction BeginDbTransaction (IsolationLevel isolationLevel)
  84. {
  85. throw new NotImplementedException ();
  86. }
  87. [MonoTODO]
  88. public override void ChangeDatabase (string value)
  89. {
  90. throw new NotImplementedException ();
  91. }
  92. [MonoTODO]
  93. public override void Close ()
  94. {
  95. throw new NotImplementedException ();
  96. }
  97. protected override DbCommand CreateDbCommand ()
  98. {
  99. return (DbCommand) ConnectionFactory.ProviderFactory.CreateCommand ();
  100. }
  101. [MonoTODO]
  102. protected override void Dispose (bool disposing)
  103. {
  104. throw new NotImplementedException ();
  105. }
  106. [MonoTODO]
  107. public override void EnlistDistributedTransaction (ITransaction transaction)
  108. {
  109. throw new NotImplementedException ();
  110. }
  111. [MonoTODO]
  112. protected virtual DbMetaDataFactory GetMetaDataFactory (DbConnectionInternal internalConnection)
  113. {
  114. throw new NotImplementedException ();
  115. }
  116. [MonoTODO]
  117. protected void OnStateChange (ConnectionState originalState, ConnectionState currentState)
  118. {
  119. throw new NotImplementedException ();
  120. }
  121. [MonoTODO]
  122. public override void Open ()
  123. {
  124. throw new NotImplementedException ();
  125. }
  126. #endregion // Methods
  127. }
  128. }
  129. #endif