private void ThrowIfStreamClosed(string method)
 {
     if (this.IsStreamClosed())
     {
         throw new ObjectDisposedException(SQLResource.InvalidOpStreamClosed(method));
     }
 }
示例#2
0
 private void ThrowIfStreamCannotRead(string method)
 {
     if (!_stream.CanRead)
     {
         throw new NotSupportedException(SQLResource.InvalidOpStreamNonReadable(method));
     }
 }
 private void ThrowIfStreamCannotWrite(string method)
 {
     if (!this.m_stream.CanWrite)
     {
         throw new NotSupportedException(SQLResource.InvalidOpStreamNonWritable(method));
     }
 }
示例#4
0
 private void ThrowIfStreamCannotSeek(string method)
 {
     if (!m_stream.CanSeek)
     {
         throw new NotSupportedException(SQLResource.InvalidOpStreamNonSeekable(method));
     }
 }