OctoTorrent.Client.DiskManager.PerformRead C# (CSharp) Method

PerformRead() private method

private PerformRead ( BufferedIO io ) : void
io BufferedIO
return void
        private void PerformRead(BufferedIO io)
        {
            try
            {
                io.ActualCount = _writer.Read(io.Files, io.Offset, io.buffer, 0, io.Count,
                                             io.PieceLength,
                                             io.Manager.Torrent.Size)
                                     ? io.Count
                                     : 0;
                _readMonitor.AddDelta(io.ActualCount);
            }
            finally {
                io.Complete = true;
                if (io.Callback != null)
                    io.Callback(io.ActualCount == io.Count);
            }
        }