2 // System.Data.DataTableReader.cs
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
.Collections
;
36 using System
.Data
.Common
;
38 namespace System
.Data
{
39 public sealed class DataTableReader
: DbDataReader
42 DataTable
[] dataTables
;
48 public DataTableReader (DataTable dt
)
49 : this (new DataTable
[] {dt}
)
54 public DataTableReader (DataTable
[] dataTables
)
56 this.dataTables
= dataTables
;
61 #endregion // Constructors
65 public override int Depth
{
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; }
82 public override object this [int index
] {
83 get { throw new NotImplementedException (); }
87 public override object this [string name
] {
88 get { throw new NotImplementedException (); }
92 public override int RecordsAffected
{
93 get { throw new NotImplementedException (); }
97 public override int VisibleFieldCount
{
98 get { throw new NotImplementedException (); }
101 #endregion // Properties
106 public override void Close ()
112 public override void Dispose ()
114 throw new NotImplementedException ();
118 public override bool GetBoolean (int i
)
120 throw new NotImplementedException ();
124 public override byte GetByte (int i
)
126 throw new NotImplementedException ();
130 public override long GetBytes (int i
, long dataIndex
, byte[] buffer
, int bufferIndex
, int length
)
132 throw new NotImplementedException ();
136 public override char GetChar (int i
)
138 throw new NotImplementedException ();
142 public override long GetChars (int i
, long dataIndex
, char[] buffer
, int bufferIndex
, int length
)
144 throw new NotImplementedException ();
148 public override string GetDataTypeName (int i
)
150 throw new NotImplementedException ();
154 public override DateTime
GetDateTime (int i
)
156 throw new NotImplementedException ();
160 public override decimal GetDecimal (int i
)
162 throw new NotImplementedException ();
166 public override double GetDouble (int i
)
168 throw new NotImplementedException ();
172 public override IEnumerator
GetEnumerator ()
174 throw new NotImplementedException ();
178 public override Type
GetFieldProviderSpecificType (int i
)
180 throw new NotImplementedException ();
184 public override Type
GetFieldType (int i
)
186 throw new NotImplementedException ();
190 public override float GetFloat (int i
)
192 throw new NotImplementedException ();
196 public override Guid
GetGuid (int i
)
198 throw new NotImplementedException ();
202 public override short GetInt16 (int i
)
204 throw new NotImplementedException ();
208 public override int GetInt32 (int i
)
210 throw new NotImplementedException ();
214 public override long GetInt64 (int i
)
216 throw new NotImplementedException ();
220 public override string GetName (int i
)
222 throw new NotImplementedException ();
226 public override int GetOrdinal (string name
)
228 throw new NotImplementedException ();
232 public override object GetProviderSpecificValue (int i
)
234 throw new NotImplementedException ();
238 public override int GetProviderSpecificValues (object[] values
)
240 throw new NotImplementedException ();
244 public override DataTable
GetSchemaTable ()
246 throw new NotImplementedException ();
250 public override string GetString (int i
)
252 throw new NotImplementedException ();
256 public override object GetValue (int i
)
258 throw new NotImplementedException ();
262 public override int GetValues (object[] values
)
264 throw new NotImplementedException ();
268 public override bool IsDBNull (int i
)
270 throw new NotImplementedException ();
274 public override bool NextResult ()
276 throw new NotImplementedException ();
280 public override bool Read ()
282 throw new NotImplementedException ();
285 #endregion // Methods