private ArrayList gdaResults;
private int currentResult;
private int currentRow;
+ private bool disposed = false;
#endregion
currentRow = -1;
}
- ~OleDbDataReader ()
- {
- if (open)
- Close ();
- }
-
public bool GetBoolean (int ordinal)
{
IntPtr value;
throw new NotImplementedException ();
}
- [MonoTODO]
- void IDisposable.Dispose ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
IEnumerator IEnumerable.GetEnumerator ()
{
- throw new NotImplementedException ();
+ return new DbEnumerator (this);
}
public bool IsDBNull (int ordinal)
}
#endregion
+
+ #region Destructors
+
+ private void Dispose (bool disposing) {
+ if (!this.disposed) {
+ if (disposing) {
+ // release any managed resources
+ command = null;
+ }
+ // release any unmanaged resources
+ if (gdaResults != null) {
+ gdaResults.Clear ();
+ gdaResults = null;
+ }
+
+ // close any handles
+ if (open)
+ Close ();
+
+ this.disposed = true;
+ }
+ }
+
+ void IDisposable.Dispose() {
+ Dispose (true);
+ }
+
+ ~OleDbDataReader() {
+ Dispose (false);
+ }
+
+ #endregion // Destructors
+
}
}