コード例 #1
0
 /// <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 EntityUtil.ImplicitlyClosedDataReaderError();
         }
         if (DataRecord.IsExplicitlyClosed)
         {
             throw EntityUtil.DataReaderClosed(methodName);
         }
     }
 }