2 // System.Data.ProviderBase.DbConnectionBase
5 // Tim Coleman (tim@timcoleman.com)
7 // Copyright (C) Tim Coleman, 2003
11 // Copyright (C) 2004 Novell, Inc (http://www.novell.com)
13 // Permission is hereby granted, free of charge, to any person obtaining
14 // a copy of this software and associated documentation files (the
15 // "Software"), to deal in the Software without restriction, including
16 // without limitation the rights to use, copy, modify, merge, publish,
17 // distribute, sublicense, and/or sell copies of the Software, and to
18 // permit persons to whom the Software is furnished to do so, subject to
19 // the following conditions:
21 // The above copyright notice and this permission notice shall be
22 // included in all copies or substantial portions of the Software.
24 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 using System.Data.Common;
36 using System.EnterpriseServices;
38 namespace System.Data.ProviderBase {
39 public abstract class DbConnectionBase : DbConnection
43 DbConnectionFactory connectionFactory;
44 DbConnectionString connectionOptions;
45 string connectionString;
51 protected DbConnectionBase (DbConnectionBase connection)
52 : this (connection.ConnectionFactory)
56 protected DbConnectionBase (DbConnectionFactory connectionFactory)
58 this.connectionFactory = connectionFactory;
61 protected DbConnectionBase ()
66 #endregion // Constructors
71 protected int CloseCount {
72 get { throw new NotImplementedException (); }
75 protected internal DbConnectionFactory ConnectionFactory {
76 get { return connectionFactory; }
79 protected internal DbConnectionString ConnectionOptions {
80 get { return connectionOptions; }
84 public override string ConnectionString {
85 get { return connectionString; }
87 connectionOptions = ConnectionFactory.CreateConnectionOptionsInternal (value);
88 connectionString = value;
93 public override int ConnectionTimeout {
94 get { throw new NotImplementedException (); }
98 protected virtual int ConnectionTimeoutInternal {
99 get { throw new NotImplementedException (); }
103 public override string Database {
104 get { throw new NotImplementedException (); }
108 public override string DataSource {
109 get { throw new NotImplementedException (); }
113 protected internal DbConnectionInternal InnerConnection {
114 get { throw new NotImplementedException (); }
118 public override string ServerVersion {
119 get { throw new NotImplementedException (); }
123 public override ConnectionState State {
124 get { throw new NotImplementedException (); }
127 #endregion // Properties
131 public event StateChangeEventHandler StateChange;
138 protected override DbTransaction BeginDbTransaction (IsolationLevel isolationLevel)
140 throw new NotImplementedException ();
144 public override void ChangeDatabase (string value)
146 throw new NotImplementedException ();
150 public override void Close ()
152 throw new NotImplementedException ();
155 protected override DbCommand CreateDbCommand ()
157 return (DbCommand) ConnectionFactory.ProviderFactory.CreateCommand ();
161 protected override void Dispose (bool disposing)
163 throw new NotImplementedException ();
167 public override void EnlistDistributedTransaction (ITransaction transaction)
169 throw new NotImplementedException ();
173 public override void EnlistTransaction (ITransaction transaction)
175 throw new NotImplementedException ();
179 protected virtual DbMetaDataFactory GetMetaDataFactory (DbConnectionInternal internalConnection)
181 throw new NotImplementedException ();
185 protected void OnStateChange (ConnectionState originalState, ConnectionState currentState)
187 throw new NotImplementedException ();
191 public override void Open ()
193 throw new NotImplementedException ();
197 public override DataTable GetSchema ()
199 throw new NotImplementedException ();
203 public override DataTable GetSchema (string collectionName)
205 throw new NotImplementedException ();
209 public override DataTable GetSchema (string collectionName, string [] restrictionValues)
211 throw new NotImplementedException ();
214 #endregion // Methods