**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Data / System.Data / DataTableReader.cs
blobddd0bb17b1f16779078b1536c995a8a77040c924
1 //
2 // System.Data.DataTableReader.cs
3 //
4 // Author:
5 // Tim Coleman (tim@timcoleman.com)
6 //
7 // Copyright (C) Tim Coleman, 2003
8 //
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:
20 //
21 // The above copyright notice and this permission notice shall be
22 // included in all copies or substantial portions of the Software.
23 //
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.
33 #if NET_2_0
35 using System.Collections;
36 using System.Data.Common;
38 namespace System.Data {
39 public sealed class DataTableReader : DbDataReader
41 bool closed;
42 DataTable[] dataTables;
43 int index;
45 #region Constructors
47 [MonoTODO]
48 public DataTableReader (DataTable dt)
49 : this (new DataTable[] {dt})
53 [MonoTODO]
54 public DataTableReader (DataTable[] dataTables)
56 this.dataTables = dataTables;
57 closed = false;
58 index = 0;
61 #endregion // Constructors
63 #region Properties
65 public override int Depth {
66 get { return 0; }
69 public override int FieldCount {
70 get { return dataTables [index].Columns.Count; }
73 public override bool HasRows {
74 get { return dataTables [index].Rows.Count > 0; }
77 public override bool IsClosed {
78 get { return closed; }
81 [MonoTODO]
82 public override object this [int index] {
83 get { throw new NotImplementedException (); }
86 [MonoTODO]
87 public override object this [string name] {
88 get { throw new NotImplementedException (); }
91 [MonoTODO]
92 public override int RecordsAffected {
93 get { throw new NotImplementedException (); }
96 [MonoTODO]
97 public override int VisibleFieldCount {
98 get { throw new NotImplementedException (); }
101 #endregion // Properties
103 #region Methods
105 [MonoTODO]
106 public override void Close ()
108 closed = true;
111 [MonoTODO]
112 public override void Dispose ()
114 throw new NotImplementedException ();
117 [MonoTODO]
118 public override bool GetBoolean (int i)
120 throw new NotImplementedException ();
123 [MonoTODO]
124 public override byte GetByte (int i)
126 throw new NotImplementedException ();
129 [MonoTODO]
130 public override long GetBytes (int i, long dataIndex, byte[] buffer, int bufferIndex, int length)
132 throw new NotImplementedException ();
135 [MonoTODO]
136 public override char GetChar (int i)
138 throw new NotImplementedException ();
141 [MonoTODO]
142 public override long GetChars (int i, long dataIndex, char[] buffer, int bufferIndex, int length)
144 throw new NotImplementedException ();
147 [MonoTODO]
148 public override string GetDataTypeName (int i)
150 throw new NotImplementedException ();
153 [MonoTODO]
154 public override DateTime GetDateTime (int i)
156 throw new NotImplementedException ();
159 [MonoTODO]
160 public override decimal GetDecimal (int i)
162 throw new NotImplementedException ();
165 [MonoTODO]
166 public override double GetDouble (int i)
168 throw new NotImplementedException ();
171 [MonoTODO]
172 public override IEnumerator GetEnumerator ()
174 throw new NotImplementedException ();
177 [MonoTODO]
178 public override Type GetFieldProviderSpecificType (int i)
180 throw new NotImplementedException ();
183 [MonoTODO]
184 public override Type GetFieldType (int i)
186 throw new NotImplementedException ();
189 [MonoTODO]
190 public override float GetFloat (int i)
192 throw new NotImplementedException ();
195 [MonoTODO]
196 public override Guid GetGuid (int i)
198 throw new NotImplementedException ();
201 [MonoTODO]
202 public override short GetInt16 (int i)
204 throw new NotImplementedException ();
207 [MonoTODO]
208 public override int GetInt32 (int i)
210 throw new NotImplementedException ();
213 [MonoTODO]
214 public override long GetInt64 (int i)
216 throw new NotImplementedException ();
219 [MonoTODO]
220 public override string GetName (int i)
222 throw new NotImplementedException ();
225 [MonoTODO]
226 public override int GetOrdinal (string name)
228 throw new NotImplementedException ();
231 [MonoTODO]
232 public override object GetProviderSpecificValue (int i)
234 throw new NotImplementedException ();
237 [MonoTODO]
238 public override int GetProviderSpecificValues (object[] values)
240 throw new NotImplementedException ();
243 [MonoTODO]
244 public override DataTable GetSchemaTable ()
246 throw new NotImplementedException ();
249 [MonoTODO]
250 public override string GetString (int i)
252 throw new NotImplementedException ();
255 [MonoTODO]
256 public override object GetValue (int i)
258 throw new NotImplementedException ();
261 [MonoTODO]
262 public override int GetValues (object[] values)
264 throw new NotImplementedException ();
267 [MonoTODO]
268 public override bool IsDBNull (int i)
270 throw new NotImplementedException ();
273 [MonoTODO]
274 public override bool NextResult ()
276 throw new NotImplementedException ();
279 [MonoTODO]
280 public override bool Read ()
282 throw new NotImplementedException ();
285 #endregion // Methods
289 #endif // NET_2_0