2003-12-23 Tim Coleman <tim@timcoleman.com>
[mono.git] / mcs / class / System.Data / System.Data.ProviderBase / DbConnectionBase.cs
1 //
2 // System.Data.ProviderBase.DbConnectionBase
3 //
4 // Author:
5 //   Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) Tim Coleman, 2003
8 //
9
10 #if NET_1_2
11
12 using System.Data.Common;
13 using System.EnterpriseServices;
14
15 namespace System.Data.ProviderBase {
16         public abstract class DbConnectionBase : DbConnection
17         {
18                 #region Fields
19
20                 DbConnectionFactory connectionFactory;
21                 DbConnectionString connectionOptions;
22                 string connectionString;
23                 
24                 #endregion // Fields
25
26                 #region Constructors
27
28                 protected DbConnectionBase (DbConnectionBase connection)
29                         : this (connection.ConnectionFactory)
30                 {
31                 }
32
33                 protected DbConnectionBase (DbConnectionFactory connectionFactory)
34                 {
35                         this.connectionFactory = connectionFactory;
36                 }
37                 
38                 #endregion // Constructors
39
40                 #region Properties
41
42                 [MonoTODO]
43                 protected int CloseCount {
44                         get { throw new NotImplementedException (); }
45                 }
46
47                 protected internal DbConnectionFactory ConnectionFactory {
48                         get { return connectionFactory; }
49                 }
50
51                 protected internal DbConnectionString ConnectionOptions {
52                         get { return connectionOptions; }
53                 }
54
55                 [MonoTODO]
56                 public override string ConnectionString {
57                         get { return connectionString; }
58                         set { 
59                                 connectionOptions = ConnectionFactory.CreateConnectionOptionsInternal (value);
60                                 connectionString = value;
61                         }
62                 }
63
64                 [MonoTODO]
65                 public override int ConnectionTimeout {
66                         get { throw new NotImplementedException (); }
67                 }
68
69                 [MonoTODO]
70                 protected virtual int ConnectionTimeoutInternal {
71                         get { throw new NotImplementedException (); }
72                 }
73
74                 [MonoTODO]
75                 public override string Database {
76                         get { throw new NotImplementedException (); }
77                 }
78
79                 [MonoTODO]
80                 public override string DataSource {
81                         get { throw new NotImplementedException (); }
82                 }
83
84                 [MonoTODO]
85                 protected internal DbConnectionInternal InnerConnection {
86                         get { throw new NotImplementedException (); }
87                 }
88
89                 [MonoTODO]
90                 public override string ServerVersion {
91                         get { throw new NotImplementedException (); }
92                 }
93
94                 [MonoTODO]
95                 public override ConnectionState State {
96                         get { throw new NotImplementedException (); }
97                 }
98
99                 #endregion // Properties
100
101                 #region Events
102
103                 public event StateChangeEventHandler StateChange;
104
105                 #endregion // Events
106
107                 #region Methods
108
109                 [MonoTODO]
110                 protected override DbTransaction BeginDbTransaction (IsolationLevel isolationLevel)
111                 {
112                         throw new NotImplementedException ();
113                 }
114
115                 [MonoTODO]
116                 public override void ChangeDatabase (string value)
117                 {
118                         throw new NotImplementedException ();
119                 }
120
121                 [MonoTODO]
122                 public override void Close ()
123                 {
124                         throw new NotImplementedException ();
125                 }
126
127                 protected override DbCommand CreateDbCommand ()
128                 {
129                         return (DbCommand) ConnectionFactory.ProviderFactory.CreateCommand ();
130                 }
131
132                 [MonoTODO]
133                 protected override void Dispose (bool disposing)
134                 {
135                         throw new NotImplementedException ();
136                 }
137
138                 [MonoTODO]
139                 public override void EnlistDistributedTransaction (ITransaction transaction)
140                 {
141                         throw new NotImplementedException ();
142                 }
143
144                 [MonoTODO]
145                 protected virtual DbMetaDataFactory GetMetaDataFactory (DbConnectionInternal internalConnection)
146                 {
147                         throw new NotImplementedException ();
148                 }
149
150                 [MonoTODO]
151                 protected void OnStateChange (ConnectionState originalState, ConnectionState currentState)
152                 {
153                         throw new NotImplementedException ();
154                 }
155
156                 [MonoTODO]
157                 public override void Open ()
158                 {
159                         throw new NotImplementedException ();
160                 }
161
162                 #endregion // Methods
163         }
164 }
165
166 #endif