Author: gert
Date: 2007-07-01 08:51:16 -0400 (Sun, 01 Jul 2007)
New Revision: 81144
Modified:
trunk/mcs/class/System.Data/System.Data.OleDb/ChangeLog
trunk/mcs/class/System.Data/System.Data.OleDb/OleDbDataReader.cs
Log:
* OleDbDataReader.cs: Code formatting.
Modified: trunk/mcs/class/System.Data/System.Data.OleDb/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data.OleDb/ChangeLog 2007-07-01
12:48:55 UTC (rev 81143)
+++ trunk/mcs/class/System.Data/System.Data.OleDb/ChangeLog 2007-07-01
12:51:16 UTC (rev 81144)
@@ -1,6 +1,7 @@
2007-07-01 Gert Driesen <[EMAIL PROTECTED]>
* OleDbCommand.cs: Code formatting.
+ * OleDbDataReader.cs: Code formatting.
* OleDbError.cs: Code formatting.
* OleDbErrorCollection.cs: Code formatting.
* OleDbException.cs: Code formatting.
Modified: trunk/mcs/class/System.Data/System.Data.OleDb/OleDbDataReader.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.OleDb/OleDbDataReader.cs
2007-07-01 12:48:55 UTC (rev 81143)
+++ trunk/mcs/class/System.Data/System.Data.OleDb/OleDbDataReader.cs
2007-07-01 12:51:16 UTC (rev 81144)
@@ -45,7 +45,7 @@
private ArrayList gdaResults;
private int currentResult;
private int currentRow;
- private bool disposed = false;
+ private bool disposed;
#endregion
@@ -75,8 +75,7 @@
public int FieldCount {
get {
- if (currentResult < 0 ||
- currentResult >= gdaResults.Count)
+ if (currentResult < 0 || currentResult >=
gdaResults.Count)
return 0;
return libgda.gda_data_model_get_n_columns (
@@ -209,7 +208,7 @@
throw new InvalidCastException ();
value = libgda.gda_data_model_get_value_at ((IntPtr)
gdaResults[currentResult],
- ordinal,
currentRow);
+ ordinal, currentRow);
if (value == IntPtr.Zero)
throw new InvalidCastException ();
@@ -240,7 +239,7 @@
attrs = libgda.gda_data_model_describe_column ((IntPtr)
gdaResults[currentResult],
- index);
+ index);
if (attrs == IntPtr.Zero)
return "unknown";
@@ -259,7 +258,7 @@
throw new InvalidCastException ();
value = libgda.gda_data_model_get_value_at ((IntPtr)
gdaResults[currentResult],
- ordinal,
currentRow);
+ ordinal, currentRow);
if (value == IntPtr.Zero)
throw new InvalidCastException ();
@@ -279,11 +278,11 @@
GdaTimestamp gdt;
gdt = (GdaTimestamp) Marshal.PtrToStructure
(libgda.gda_value_get_timestamp (value),
-
typeof (GdaTimestamp));
+ typeof (GdaTimestamp));
return new DateTime ((int) gdt.year, (int)
gdt.month, (int) gdt.day,
- (int) gdt.hour, (int)
gdt.minute, (int) gdt.second,
- (int) gdt.fraction);
+ (int) gdt.hour, (int) gdt.minute, (int)
gdt.second,
+ (int) gdt.fraction);
}
throw new InvalidCastException ();
@@ -352,7 +351,7 @@
throw new InvalidCastException ();
value = libgda.gda_data_model_get_value_at ((IntPtr)
gdaResults[currentResult],
- ordinal,
currentRow);
+ ordinal, currentRow);
if (value == IntPtr.Zero)
throw new InvalidCastException ();
@@ -375,7 +374,7 @@
throw new InvalidCastException ();
value = libgda.gda_data_model_get_value_at ((IntPtr)
gdaResults[currentResult],
- ordinal,
currentRow);
+ ordinal, currentRow);
if (value == IntPtr.Zero)
throw new InvalidCastException ();
@@ -392,7 +391,7 @@
throw new InvalidCastException ();
value = libgda.gda_data_model_get_value_at ((IntPtr)
gdaResults[currentResult],
- ordinal,
currentRow);
+ ordinal, currentRow);
if (value == IntPtr.Zero)
throw new InvalidCastException ();
@@ -409,7 +408,7 @@
throw new InvalidCastException ();
value = libgda.gda_data_model_get_value_at ((IntPtr)
gdaResults[currentResult],
- ordinal,
currentRow);
+ ordinal, currentRow);
if (value == IntPtr.Zero)
throw new InvalidCastException ();
@@ -486,7 +485,7 @@
dataTableSchema.Columns.Add ("IsHidden", typeof
(bool));
dataTableSchema.Columns.Add ("IsLong", typeof
(bool));
dataTableSchema.Columns.Add ("IsReadOnly",
typeof (bool));
-
+
DataRow schemaRow;
DbType dbType;
Type typ;
@@ -508,7 +507,7 @@
gdaType =
libgda.gda_field_attributes_get_gdatype (attrs);
columnSize =
libgda.gda_field_attributes_get_defined_size (attrs);
libgda.gda_field_attributes_free
(attrs);
-
+
schemaRow["ColumnName"] =
this.GetName(i);
schemaRow["ColumnOrdinal"] = i + 1;
@@ -530,7 +529,7 @@
schemaRow["BaseSchemaName"] = "";
schemaRow["BaseTableName"] = "";
- schemaRow["DataType"] =
this.GetFieldType(i);
+ schemaRow["DataType"] =
this.GetFieldType(i);
schemaRow["AllowDBNull"] = false;
@@ -551,10 +550,10 @@
#if DEBUG_OleDbDataReader
Console.WriteLine("********** DEBUG Table
Schema BEGIN ************");
- foreach (DataRow myRow in dataTableSchema.Rows)
{
- foreach (DataColumn myCol in
dataTableSchema.Columns)
-
Console.WriteLine(myCol.ColumnName + " = " + myRow[myCol]);
- Console.WriteLine();
+ foreach (DataRow myRow in dataTableSchema.Rows)
{
+ foreach (DataColumn myCol in
dataTableSchema.Columns)
+
Console.WriteLine(myCol.ColumnName + " = " + myRow[myCol]);
+ Console.WriteLine();
}
Console.WriteLine("********** DEBUG Table
Schema END ************");
#endif // DEBUG_OleDbDataReader
@@ -572,7 +571,7 @@
throw new InvalidCastException ();
value = libgda.gda_data_model_get_value_at ((IntPtr)
gdaResults[currentResult],
- ordinal,
currentRow);
+ ordinal, currentRow);
if (value == IntPtr.Zero)
throw new InvalidCastException ();
@@ -596,7 +595,7 @@
throw new IndexOutOfRangeException ();
value = libgda.gda_data_model_get_value_at ((IntPtr)
gdaResults[currentResult],
- ordinal,
currentRow);
+ ordinal, currentRow);
if (value == IntPtr.Zero)
throw new IndexOutOfRangeException ();
@@ -643,7 +642,7 @@
throw new IndexOutOfRangeException ();
value = libgda.gda_data_model_get_value_at ((IntPtr)
gdaResults[currentResult],
- ordinal,
currentRow);
+ ordinal, currentRow);
if (value == IntPtr.Zero)
throw new IndexOutOfRangeException ();
@@ -663,13 +662,11 @@
public bool Read ()
{
- if (currentResult < 0 ||
- currentResult >= gdaResults.Count)
+ if (currentResult < 0 || currentResult >=
gdaResults.Count)
return false;
currentRow++;
- if (currentRow <
- libgda.gda_data_model_get_n_rows ((IntPtr)
gdaResults[currentResult]))
+ if (currentRow < libgda.gda_data_model_get_n_rows
((IntPtr) gdaResults[currentResult]))
return true;
return false;
@@ -697,7 +694,7 @@
if (open)
Close ();
- this.disposed = true;
+ this.disposed = true;
}
}
@@ -710,6 +707,5 @@
}
#endregion // Destructors
-
}
}
Property changes on:
trunk/mcs/class/System.Data/System.Data.OleDb/OleDbDataReader.cs
___________________________________________________________________
Name: svn:eol-style
+ native
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches