/// <summary> /// Ensures that the reader is actually open, and throws an exception if not /// </summary> private void AssertReaderIsOpen() { if (IsExplicitlyClosed) { throw Error.ADP_ClosedDataReaderError(); } if (IsImplicitlyClosed) { throw Error.ADP_ImplicitlyClosedDataReaderError(); } }
/// <summary> /// Ensures that the reader is actually open, and throws an exception if not /// </summary> private void AssertReaderIsOpen(string methodName) { if (IsClosed) { if (_dataRecord.IsImplicitlyClosed) { throw Error.ADP_ImplicitlyClosedDataReaderError(); } if (_dataRecord.IsExplicitlyClosed) { throw Error.ADP_DataReaderClosed(methodName); } } }
private void AssertReaderIsOpen(string methodName) { if (!this.IsClosed) { return; } if (this._dataRecord.IsImplicitlyClosed) { throw Error.ADP_ImplicitlyClosedDataReaderError(); } if (this._dataRecord.IsExplicitlyClosed) { throw Error.ADP_DataReaderClosed((object)methodName); } }