File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ internal class SftpFileReader : ISftpFileReader
2020 /// Holds the size of the file, when available.
2121 /// </summary>
2222 private readonly long ? _fileSize ;
23- private readonly IDictionary < int , BufferedRead > _queue ;
23+ private readonly Dictionary < int , BufferedRead > _queue ;
2424 private readonly WaitHandle [ ] _waitHandles ;
2525
2626 private int _readAheadChunkIndex ;
@@ -325,9 +325,7 @@ private bool ContinueReadAhead()
325325
326326 private void ReadCompleted ( IAsyncResult result )
327327 {
328- var readAsyncResult = result as SftpReadAsyncResult ;
329- if ( readAsyncResult == null )
330- return ;
328+ var readAsyncResult = ( SftpReadAsyncResult ) result ;
331329
332330 byte [ ] data ;
333331
@@ -343,7 +341,7 @@ private void ReadCompleted(IAsyncResult result)
343341
344342 // a read that completes with a zero-byte result signals EOF
345343 // but there may be pending reads before that read
346- var bufferedRead = ( BufferedRead ) readAsyncResult . AsyncState ;
344+ var bufferedRead = ( BufferedRead ) readAsyncResult . AsyncState ;
347345 bufferedRead . Complete ( data ) ;
348346
349347 lock ( _readLock )
You can’t perform that action at this time.
0 commit comments