Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -42,11 +42,7 @@ using System.Text;
namespace System.Data.Odbc
{
#if NET_2_0
public sealed class OdbcDataReader : DbDataReader
#else
public sealed class OdbcDataReader : MarshalByRefObject, IDataReader, IDisposable, IDataRecord, IEnumerable
#endif
{
#region Fields
@@ -95,9 +91,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
int Depth {
get {
return 0; // no nested selects supported
@@ -105,9 +99,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
int FieldCount {
get {
if (IsClosed)
@@ -117,9 +109,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
bool IsClosed {
get {
return !open;
@@ -127,9 +117,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
object this [string value] {
get {
int pos = GetOrdinal (value);
@@ -138,9 +126,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
object this [int i] {
get {
return GetValue (i);
@@ -148,9 +134,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
int RecordsAffected {
get {
return _recordsAffected;
@@ -159,9 +143,7 @@ namespace System.Data.Odbc
[MonoTODO]
public
#if NET_2_0
override
#endif // NET_2_0
bool HasRows {
get { throw new NotImplementedException(); }
}
@@ -227,9 +209,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
void Close ()
{
// FIXME : have to implement output parameter binding
@@ -242,35 +222,23 @@ namespace System.Data.Odbc
this.command.Connection.Close ();
}
#if ONLY_1_1
~OdbcDataReader ()
{
this.Dispose (false);
}
#endif
public
#if NET_2_0
override
#endif // NET_2_0
bool GetBoolean (int i)
{
return (bool) GetValue (i);
}
public
#if NET_2_0
override
#endif // NET_2_0
byte GetByte (int i)
{
return Convert.ToByte (GetValue (i));
}
public
#if NET_2_0
override
#endif // NET_2_0
long GetBytes (int i, long dataIndex, byte[] buffer, int bufferIndex, int length)
{
if (IsClosed)
@@ -340,9 +308,7 @@ namespace System.Data.Odbc
[MonoTODO]
public
#if NET_2_0
override
#endif // NET_2_0
char GetChar (int i)
{
throw new NotImplementedException ();
@@ -350,9 +316,7 @@ namespace System.Data.Odbc
[MonoTODO]
public
#if NET_2_0
override
#endif // NET_2_0
long GetChars (int i, long dataIndex, char[] buffer, int bufferIndex, int length)
{
if (IsClosed)
@@ -366,21 +330,14 @@ namespace System.Data.Odbc
[MonoTODO]
[EditorBrowsableAttribute (EditorBrowsableState.Never)]
#if ONLY_1_1
public
#endif
#if NET_2_0
new
#endif
IDataReader GetData (int i)
{
throw new NotImplementedException ();
}
public
#if NET_2_0
override
#endif // NET_2_0
string GetDataTypeName (int i)
{
if (IsClosed)
@@ -396,36 +353,28 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
DateTime GetDateTime (int i)
{
return (DateTime) GetValue (i);
}
public
#if NET_2_0
override
#endif // NET_2_0
decimal GetDecimal (int i)
{
return (decimal) GetValue (i);
}
public
#if NET_2_0
override
#endif // NET_2_0
double GetDouble (int i)
{
return (double) GetValue (i);
}
public
#if NET_2_0
override
#endif // NET_2_0
Type GetFieldType (int i)
{
if (IsClosed)
@@ -434,9 +383,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
float GetFloat (int i)
{
return (float) GetValue (i);
@@ -444,45 +391,35 @@ namespace System.Data.Odbc
[MonoTODO]
public
#if NET_2_0
override
#endif // NET_2_0
Guid GetGuid (int i)
{
throw new NotImplementedException ();
}
public
#if NET_2_0
override
#endif // NET_2_0
short GetInt16 (int i)
{
return (short) GetValue (i);
}
public
#if NET_2_0
override
#endif // NET_2_0
int GetInt32 (int i)
{
return (int) GetValue (i);
}
public
#if NET_2_0
override
#endif // NET_2_0
long GetInt64 (int i)
{
return (long) GetValue (i);
}
public
#if NET_2_0
override
#endif // NET_2_0
string GetName (int i)
{
if (IsClosed)
@@ -491,9 +428,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
int GetOrdinal (string value)
{
if (IsClosed)
@@ -509,9 +444,7 @@ namespace System.Data.Odbc
[MonoTODO]
public
#if NET_2_0
override
#endif // NET_2_0
DataTable GetSchemaTable ()
{
if (IsClosed)
@@ -632,9 +565,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
string GetString (int i)
{
object ret = GetValue (i);
@@ -652,9 +583,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
object GetValue (int i)
{
if (IsClosed)
@@ -861,9 +790,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
int GetValues (object [] values)
{
int numValues = 0;
@@ -893,29 +820,13 @@ namespace System.Data.Odbc
return numValues;
}
#if ONLY_1_1
void IDisposable.Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
IEnumerator IEnumerable.GetEnumerator ()
{
return new DbEnumerator (this);
}
#endif // ONLY_1_1
#if NET_2_0
public override IEnumerator GetEnumerator ()
{
return new DbEnumerator (this);
}
#endif
#if NET_2_0
protected override
#endif
void Dispose (bool disposing)
{
if (disposed)
@@ -933,9 +844,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
bool IsDBNull (int i)
{
return (GetValue (i) is DBNull);
@@ -945,9 +854,7 @@ namespace System.Data.Odbc
/// Move to the next result set.
/// </remarks>
public
#if NET_2_0
override
#endif // NET_2_0
bool NextResult ()
{
OdbcReturn ret = OdbcReturn.Success;
@@ -1138,9 +1045,7 @@ namespace System.Data.Odbc
}
public
#if NET_2_0
override
#endif // NET_2_0
bool Read ()
{
return NextRow ();