diff --git a/src/NHibernate/AdoNet/ResultSetWrapper.cs b/src/NHibernate/AdoNet/ResultSetWrapper.cs index f3a291e971e..75e03a3ef5e 100644 --- a/src/NHibernate/AdoNet/ResultSetWrapper.cs +++ b/src/NHibernate/AdoNet/ResultSetWrapper.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Data; using System.Data.Common; @@ -12,7 +13,7 @@ namespace NHibernate.AdoNet /// public class ResultSetWrapper : DbDataReader { - private readonly DbDataReader rs; + private DbDataReader rs; private readonly ColumnNameCache columnNameCache; public ResultSetWrapper(DbDataReader resultSet, ColumnNameCache columnNameCache) @@ -26,206 +27,192 @@ internal DbDataReader Target get { return rs; } } - #region DbDataReader Members - - public void Close() + public override void Close() { rs.Close(); } - public DataTable GetSchemaTable() + public override DataTable GetSchemaTable() { return rs.GetSchemaTable(); } - public bool NextResult() + public override bool NextResult() { return rs.NextResult(); } - public bool Read() + public override bool Read() { return rs.Read(); } - public int Depth + public override int Depth { get { return rs.Depth; } } - public bool IsClosed + public override bool HasRows { - get { return rs.IsClosed; } + get { return rs.HasRows; } } - public int RecordsAffected + public override bool IsClosed { - get { return rs.RecordsAffected; } + get { return rs.IsClosed; } } - #endregion - - #region IDisposable Members - private bool disposed; - - ~ResultSetWrapper() + public override int RecordsAffected { - Dispose(false); + get { return rs.RecordsAffected; } } - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } + private bool disposed; - private void Dispose(bool disposing) + protected override void Dispose(bool disposing) { if (disposed) return; - if (disposing) + if (disposing && rs != null) { - if (rs != null) - { - if (!rs.IsClosed) rs.Close(); rs.Dispose(); + rs = null; } - } disposed = true; } - #endregion - - #region IDataRecord Members - public string GetName(int i) + public override string GetName(int i) { return rs.GetName(i); } - public string GetDataTypeName(int i) + public override string GetDataTypeName(int i) { return rs.GetDataTypeName(i); } - public System.Type GetFieldType(int i) + public override IEnumerator GetEnumerator() + { + return rs.GetEnumerator(); + } + + public override System.Type GetFieldType(int i) { return rs.GetFieldType(i); } - public object GetValue(int i) + public override object GetValue(int i) { return rs.GetValue(i); } - public int GetValues(object[] values) + public override int GetValues(object[] values) { return rs.GetValues(values); } - public int GetOrdinal(string name) + public override int GetOrdinal(string name) { return columnNameCache.GetIndexForColumnName(name, this); } - public bool GetBoolean(int i) + public override bool GetBoolean(int i) { return rs.GetBoolean(i); } - public byte GetByte(int i) + public override byte GetByte(int i) { return rs.GetByte(i); } - public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length) + public override long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length) { return rs.GetBytes(i, fieldOffset, buffer, bufferoffset, length); } - public char GetChar(int i) + public override char GetChar(int i) { return rs.GetChar(i); } - public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length) + public override long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length) { return rs.GetChars(i, fieldoffset, buffer, bufferoffset, length); } - public Guid GetGuid(int i) + public override Guid GetGuid(int i) { return rs.GetGuid(i); } - public short GetInt16(int i) + public override short GetInt16(int i) { return rs.GetInt16(i); } - public int GetInt32(int i) + public override int GetInt32(int i) { return rs.GetInt32(i); } - public long GetInt64(int i) + public override long GetInt64(int i) { return rs.GetInt64(i); } - public float GetFloat(int i) + public override float GetFloat(int i) { return rs.GetFloat(i); } - public double GetDouble(int i) + public override double GetDouble(int i) { return rs.GetDouble(i); } - public string GetString(int i) + public override string GetString(int i) { return rs.GetString(i); } - public decimal GetDecimal(int i) + public override decimal GetDecimal(int i) { return rs.GetDecimal(i); } - public DateTime GetDateTime(int i) + public override DateTime GetDateTime(int i) { return rs.GetDateTime(i); } - public DbDataReader GetData(int i) + protected override DbDataReader GetDbDataReader(int ordinal) { - return rs.GetData(i); + return rs.GetData(ordinal); } - public bool IsDBNull(int i) + public override bool IsDBNull(int i) { return rs.IsDBNull(i); } - public int FieldCount + public override int FieldCount { get { return rs.FieldCount; } } - public object this[int i] + public override object this[int i] { get { return rs[i]; } } - public object this[string name] + public override object this[string name] { get { return rs[columnNameCache.GetIndexForColumnName(name, this)]; } } - #endregion - public override bool Equals(object obj) { return rs.Equals(obj); diff --git a/src/NHibernate/Driver/BasicResultSetsCommand.cs b/src/NHibernate/Driver/BasicResultSetsCommand.cs index a67bee32280..aff389091c3 100644 --- a/src/NHibernate/Driver/BasicResultSetsCommand.cs +++ b/src/NHibernate/Driver/BasicResultSetsCommand.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; using System.Data; using System.Data.Common; @@ -100,140 +101,141 @@ public BatcherDataReaderWrapper(IBatcher batcher, DbCommand command) reader = batcher.ExecuteReader(command); } - public void Dispose() + public override string GetName(int i) { - batcher.CloseCommand(command, reader); + return reader.GetName(i); } - #region IDataRecord Members - - public string GetName(int i) + public override string GetDataTypeName(int i) { - return reader.GetName(i); + return reader.GetDataTypeName(i); } - public string GetDataTypeName(int i) + public override IEnumerator GetEnumerator() { - return reader.GetDataTypeName(i); + return reader.GetEnumerator(); } - public System.Type GetFieldType(int i) + public override System.Type GetFieldType(int i) { return reader.GetFieldType(i); } - public object GetValue(int i) + public override object GetValue(int i) { return reader.GetValue(i); } - public int GetValues(object[] values) + public override int GetValues(object[] values) { return reader.GetValues(values); } - public int GetOrdinal(string name) + public override int GetOrdinal(string name) { return reader.GetOrdinal(name); } - public bool GetBoolean(int i) + public override bool GetBoolean(int i) { return reader.GetBoolean(i); } - public byte GetByte(int i) + public override byte GetByte(int i) { return reader.GetByte(i); } - public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length) + public override long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length) { return reader.GetBytes(i, fieldOffset, buffer, bufferoffset, length); } - public char GetChar(int i) + public override char GetChar(int i) { return reader.GetChar(i); } - public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length) + public override long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length) { return reader.GetChars(i, fieldoffset, buffer, bufferoffset, length); } - public Guid GetGuid(int i) + public override Guid GetGuid(int i) { return reader.GetGuid(i); } - public short GetInt16(int i) + public override short GetInt16(int i) { return reader.GetInt16(i); } - public int GetInt32(int i) + public override int GetInt32(int i) { return reader.GetInt32(i); } - public long GetInt64(int i) + public override long GetInt64(int i) { return reader.GetInt64(i); } - public float GetFloat(int i) + public override float GetFloat(int i) { return reader.GetFloat(i); } - public double GetDouble(int i) + public override double GetDouble(int i) { return reader.GetDouble(i); } - public string GetString(int i) + public override string GetString(int i) { return reader.GetString(i); } - public decimal GetDecimal(int i) + public override decimal GetDecimal(int i) { return reader.GetDecimal(i); } - public DateTime GetDateTime(int i) + public override DateTime GetDateTime(int i) { return reader.GetDateTime(i); } - public DbDataReader GetData(int i) + protected override DbDataReader GetDbDataReader(int ordinal) { - return reader.GetData(i); + return reader.GetData(ordinal); } - public bool IsDBNull(int i) + public override bool IsDBNull(int i) { return reader.IsDBNull(i); } - public int FieldCount + public override int FieldCount { get { return reader.FieldCount; } } - public object this[int i] + public override bool HasRows + { + get { return reader.HasRows; } + } + + public override object this[int i] { get { return reader[i]; } } - public object this[string name] + public override object this[string name] { get { return reader[name]; } } - #endregion - public override bool Equals(object obj) { return reader.Equals(obj); @@ -244,37 +246,37 @@ public override int GetHashCode() return reader.GetHashCode(); } - public void Close() + public override void Close() { batcher.CloseCommand(command, reader); } - public DataTable GetSchemaTable() + public override DataTable GetSchemaTable() { return reader.GetSchemaTable(); } - public bool NextResult() + public override bool NextResult() { return reader.NextResult(); } - public bool Read() + public override bool Read() { return reader.Read(); } - public int Depth + public override int Depth { get { return reader.Depth; } } - public bool IsClosed + public override bool IsClosed { get { return reader.IsClosed; } } - public int RecordsAffected + public override int RecordsAffected { get { return reader.RecordsAffected; } } diff --git a/src/NHibernate/Driver/NDataReader.cs b/src/NHibernate/Driver/NDataReader.cs index 9f345bce966..d70e4c1a030 100644 --- a/src/NHibernate/Driver/NDataReader.cs +++ b/src/NHibernate/Driver/NDataReader.cs @@ -1,7 +1,8 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Data;using System.Data.Common; +using System.Data; +using System.Data.Common; using NHibernate.Util; namespace NHibernate.Driver @@ -19,7 +20,7 @@ public class NDataReader : DbDataReader { private NResult[] results; - private bool isClosed = false; + private bool isClosed; // a DataReader is positioned before the first valid record private int currentRowIndex = -1; @@ -99,22 +100,25 @@ private object GetValue(string name) return GetCurrentResult().GetValue(currentRowIndex, name); } - #region DbDataReader Members - /// - public int RecordsAffected + public override int RecordsAffected { get { throw new NotImplementedException("NDataReader should only be used for SELECT statements!"); } } + public override bool HasRows + { + get { return results.LongLength > 0; } + } + /// - public bool IsClosed + public override bool IsClosed { get { return isClosed; } } /// - public bool NextResult() + public override bool NextResult() { currentResultIndex++; currentRowIndex = -1; @@ -131,13 +135,13 @@ public bool NextResult() } /// - public void Close() + public override void Close() { isClosed = true; } /// - public bool Read() + public override bool Read() { currentRowIndex++; @@ -154,59 +158,42 @@ public bool Read() } /// - public int Depth + public override int Depth { get { return currentResultIndex; } } /// - public DataTable GetSchemaTable() + public override DataTable GetSchemaTable() { return GetCurrentResult().GetSchemaTable(); } - #endregion - - #region IDisposable Members - - /// - /// Takes care of freeing the managed and unmanaged resources that - /// this class is responsible for. - /// - /// - /// There are not any unmanaged resources or any disposable managed - /// resources that this class is holding onto. It is in here - /// to comply with the interface. - /// - public void Dispose() + protected override void Dispose(bool disposing) { isClosed = true; ClearCache(); results = null; } - #endregion - - #region IDataRecord Members - /// /// /// /// /// - public int GetInt32(int i) + public override int GetInt32(int i) { return Convert.ToInt32(GetValue(i)); } /// - public object this[string name] + public override object this[string name] { get { return GetValue(name); } } /// - public object this[int i] + public override object this[int i] { get { return GetValue(i); } } @@ -216,7 +203,7 @@ public object this[int i] /// /// /// - public object GetValue(int i) + public override object GetValue(int i) { return GetCurrentResult().GetValue(currentRowIndex, i); } @@ -226,7 +213,7 @@ public object GetValue(int i) /// /// /// - public bool IsDBNull(int i) + public override bool IsDBNull(int i) { return GetValue(i).Equals(DBNull.Value); } @@ -240,7 +227,7 @@ public bool IsDBNull(int i) /// /// /// - public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferOffset, int length) + public override long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferOffset, int length) { if (cachedByteArray == null || cachedColIndex != i) { @@ -270,17 +257,22 @@ public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferOffset, i /// /// /// - public byte GetByte(int i) + public override byte GetByte(int i) { return Convert.ToByte(GetValue(i)); } + public override IEnumerator GetEnumerator() + { + throw new NotImplementedException(); + } + /// /// /// /// /// - public System.Type GetFieldType(int i) + public override System.Type GetFieldType(int i) { return GetCurrentResult().GetFieldType(i); } @@ -290,7 +282,7 @@ public System.Type GetFieldType(int i) /// /// /// - public decimal GetDecimal(int i) + public override decimal GetDecimal(int i) { return Convert.ToDecimal(GetValue(i)); } @@ -300,7 +292,7 @@ public decimal GetDecimal(int i) /// /// /// - public int GetValues(object[] values) + public override int GetValues(object[] values) { return GetCurrentResult().GetValues(currentRowIndex, values); } @@ -310,13 +302,13 @@ public int GetValues(object[] values) /// /// /// - public string GetName(int i) + public override string GetName(int i) { return GetCurrentResult().GetName(i); } /// - public int FieldCount + public override int FieldCount { get { return GetCurrentResult().GetFieldCount(); } } @@ -326,7 +318,7 @@ public int FieldCount /// /// /// - public long GetInt64(int i) + public override long GetInt64(int i) { return Convert.ToInt64(GetValue(i)); } @@ -336,7 +328,7 @@ public long GetInt64(int i) /// /// /// - public double GetDouble(int i) + public override double GetDouble(int i) { return Convert.ToDouble(GetValue(i)); } @@ -346,7 +338,7 @@ public double GetDouble(int i) /// /// /// - public bool GetBoolean(int i) + public override bool GetBoolean(int i) { return Convert.ToBoolean(GetValue(i)); } @@ -356,7 +348,7 @@ public bool GetBoolean(int i) /// /// /// - public Guid GetGuid(int i) + public override Guid GetGuid(int i) { return (Guid) GetValue(i); } @@ -366,7 +358,7 @@ public Guid GetGuid(int i) /// /// /// - public DateTime GetDateTime(int i) + public override DateTime GetDateTime(int i) { return Convert.ToDateTime(GetValue(i)); } @@ -376,7 +368,7 @@ public DateTime GetDateTime(int i) /// /// /// - public int GetOrdinal(string name) + public override int GetOrdinal(string name) { return GetCurrentResult().GetOrdinal(name); } @@ -386,7 +378,7 @@ public int GetOrdinal(string name) /// /// /// - public string GetDataTypeName(int i) + public override string GetDataTypeName(int i) { return GetCurrentResult().GetDataTypeName(i); } @@ -396,19 +388,14 @@ public string GetDataTypeName(int i) /// /// /// - public float GetFloat(int i) + public override float GetFloat(int i) { return Convert.ToSingle(GetValue(i)); } - /// - /// - /// - /// - /// - public DbDataReader GetData(int i) + protected override DbDataReader GetDbDataReader(int ordinal) { - throw new NotImplementedException("GetData(int) has not been implemented."); + throw new NotImplementedException("GetDbDataReader(int) has not been implemented."); } /// @@ -420,7 +407,7 @@ public DbDataReader GetData(int i) /// /// /// - public long GetChars(int i, long fieldOffset, char[] buffer, int bufferOffset, int length) + public override long GetChars(int i, long fieldOffset, char[] buffer, int bufferOffset, int length) { if (cachedCharArray == null || cachedColIndex != i) { @@ -445,7 +432,7 @@ public long GetChars(int i, long fieldOffset, char[] buffer, int bufferOffset, i /// /// /// - public string GetString(int i) + public override string GetString(int i) { return Convert.ToString(GetValue(i)); } @@ -455,7 +442,7 @@ public string GetString(int i) /// /// /// - public char GetChar(int i) + public override char GetChar(int i) { return Convert.ToChar(GetValue(i)); } @@ -465,13 +452,11 @@ public char GetChar(int i) /// /// /// - public short GetInt16(int i) + public override short GetInt16(int i) { return Convert.ToInt16(GetValue(i)); } - #endregion - /// /// Stores a Result from a DataReader in memory. /// diff --git a/src/NHibernate/Driver/NHybridDataReader.cs b/src/NHibernate/Driver/NHybridDataReader.cs index 94cffd14d09..a168e46fd2a 100644 --- a/src/NHibernate/Driver/NHybridDataReader.cs +++ b/src/NHibernate/Driver/NHybridDataReader.cs @@ -1,6 +1,7 @@ using System; -using System.Data;using System.Data.Common; - +using System.Collections; +using System.Data; +using System.Data.Common; namespace NHibernate.Driver { @@ -22,10 +23,10 @@ namespace NHibernate.Driver /// public class NHybridDataReader : DbDataReader { - private IInternalLogger log = LoggerProvider.LoggerFor(typeof(NHybridDataReader)); + private readonly IInternalLogger log = LoggerProvider.LoggerFor(typeof(NHybridDataReader)); private DbDataReader _reader; - private bool _isMidstream = false; + private bool _isMidstream; public DbDataReader Target { get { return _reader; } } @@ -82,22 +83,25 @@ public bool IsMidstream get { return _isMidstream; } } - #region DbDataReader Members - /// - public int RecordsAffected + public override int RecordsAffected { get { return _reader.RecordsAffected; } } + public override bool HasRows + { + get { return _reader.HasRows; } + } + /// - public bool IsClosed + public override bool IsClosed { get { return _reader.IsClosed; } } /// - public bool NextResult() + public override bool NextResult() { // we are not in middle of a result _isMidstream = false; @@ -105,38 +109,34 @@ public bool NextResult() } /// - public void Close() + public override void Close() { _reader.Close(); } /// - public bool Read() + public override bool Read() { _isMidstream = _reader.Read(); return _isMidstream; } /// - public int Depth + public override int Depth { get { return _reader.Depth; } } /// - public DataTable GetSchemaTable() + public override DataTable GetSchemaTable() { return _reader.GetSchemaTable(); } - #endregion - - #region IDisposable Members - /// /// A flag to indicate if Disose() has been called. /// - private bool _isAlreadyDisposed; + private bool disposed; /// /// Finalizer that ensures the object is correctly disposed of. @@ -150,65 +150,43 @@ public DataTable GetSchemaTable() /// Takes care of freeing the managed and unmanaged resources that /// this class is responsible for. /// - public void Dispose() - { - log.Debug("running NHybridDataReader.Dispose()"); - Dispose(true); - } - - /// - /// Takes care of freeing the managed and unmanaged resources that - /// this class is responsible for. - /// - /// Indicates if this NHybridDataReader is being Disposed of or Finalized. + /// Indicates if this NHybridDataReader is being Disposed of or Finalized. /// /// If this NHybridDataReader is being Finalized (isDisposing==false) then make sure not /// to call any methods that could potentially bring this NHybridDataReader back to life. /// - protected virtual void Dispose(bool isDisposing) + protected override void Dispose(bool disposing) { - if (_isAlreadyDisposed) - { - // don't dispose of multiple times. + if (disposed) return; - } - // free managed resources that are being managed by the NHybridDataReader if we - // know this call came through Dispose() - if (isDisposing) + if (disposing && _reader != null) { _reader.Dispose(); + _reader = null; } - // free unmanaged resources here - - _isAlreadyDisposed = true; - // nothing for Finalizer to do - so tell the GC to ignore it - GC.SuppressFinalize(this); + disposed = true; } - #endregion - - #region IDataRecord Members - /// /// /// /// /// - public int GetInt32(int i) + public override int GetInt32(int i) { return _reader.GetInt32(i); } /// - public object this[string name] + public override object this[string name] { get { return _reader[name]; } } /// - object IDataRecord.this[int i] + public override object this[int i] { get { return _reader[i]; } } @@ -218,7 +196,7 @@ object IDataRecord.this[int i] /// /// /// - public object GetValue(int i) + public override object GetValue(int i) { return _reader.GetValue(i); } @@ -228,7 +206,7 @@ public object GetValue(int i) /// /// /// - public bool IsDBNull(int i) + public override bool IsDBNull(int i) { return _reader.IsDBNull(i); } @@ -242,7 +220,7 @@ public bool IsDBNull(int i) /// /// /// - public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length) + public override long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length) { return _reader.GetBytes(i, fieldOffset, buffer, bufferoffset, length); } @@ -252,17 +230,22 @@ public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, i /// /// /// - public byte GetByte(int i) + public override byte GetByte(int i) { return _reader.GetByte(i); } + public override IEnumerator GetEnumerator() + { + return _reader.GetEnumerator(); + } + /// /// /// /// /// - public System.Type GetFieldType(int i) + public override System.Type GetFieldType(int i) { return _reader.GetFieldType(i); } @@ -272,7 +255,7 @@ public System.Type GetFieldType(int i) /// /// /// - public decimal GetDecimal(int i) + public override decimal GetDecimal(int i) { return _reader.GetDecimal(i); } @@ -282,7 +265,7 @@ public decimal GetDecimal(int i) /// /// /// - public int GetValues(object[] values) + public override int GetValues(object[] values) { return _reader.GetValues(values); } @@ -292,13 +275,13 @@ public int GetValues(object[] values) /// /// /// - public string GetName(int i) + public override string GetName(int i) { return _reader.GetName(i); } /// - public int FieldCount + public override int FieldCount { get { return _reader.FieldCount; } } @@ -308,7 +291,7 @@ public int FieldCount /// /// /// - public long GetInt64(int i) + public override long GetInt64(int i) { return _reader.GetInt64(i); } @@ -318,7 +301,7 @@ public long GetInt64(int i) /// /// /// - public double GetDouble(int i) + public override double GetDouble(int i) { return _reader.GetDouble(i); } @@ -328,7 +311,7 @@ public double GetDouble(int i) /// /// /// - public bool GetBoolean(int i) + public override bool GetBoolean(int i) { return _reader.GetBoolean(i); } @@ -338,7 +321,7 @@ public bool GetBoolean(int i) /// /// /// - public Guid GetGuid(int i) + public override Guid GetGuid(int i) { return _reader.GetGuid(i); } @@ -348,7 +331,7 @@ public Guid GetGuid(int i) /// /// /// - public DateTime GetDateTime(int i) + public override DateTime GetDateTime(int i) { return _reader.GetDateTime(i); } @@ -358,7 +341,7 @@ public DateTime GetDateTime(int i) /// /// /// - public int GetOrdinal(string name) + public override int GetOrdinal(string name) { return _reader.GetOrdinal(name); } @@ -368,7 +351,7 @@ public int GetOrdinal(string name) /// /// /// - public string GetDataTypeName(int i) + public override string GetDataTypeName(int i) { return _reader.GetDataTypeName(i); } @@ -378,19 +361,14 @@ public string GetDataTypeName(int i) /// /// /// - public float GetFloat(int i) + public override float GetFloat(int i) { return _reader.GetFloat(i); } - /// - /// - /// - /// - /// - public DbDataReader GetData(int i) + protected override DbDataReader GetDbDataReader(int ordinal) { - return _reader.GetData(i); + return _reader.GetData(ordinal); } /// @@ -402,7 +380,7 @@ public DbDataReader GetData(int i) /// /// /// - public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length) + public override long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length) { return _reader.GetChars(i, fieldoffset, buffer, bufferoffset, length); } @@ -412,7 +390,7 @@ public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, i /// /// /// - public string GetString(int i) + public override string GetString(int i) { return _reader.GetString(i); } @@ -422,7 +400,7 @@ public string GetString(int i) /// /// /// - public char GetChar(int i) + public override char GetChar(int i) { return _reader.GetChar(i); } @@ -432,11 +410,9 @@ public char GetChar(int i) /// /// /// - public short GetInt16(int i) + public override short GetInt16(int i) { return _reader.GetInt16(i); } - - #endregion } } \ No newline at end of file