private void OnDownloadBytes(Guid transferId, string location, out long totalSize, long offset, int length, Stream output)
            {
                DownloadBytesEventArgs args = new DownloadBytesEventArgs(transferId, location, offset, length);

                if (DownloadBytes != null)
                {
                    DownloadBytes(this, args);
                }
                Check.Assert <InvalidOperationException>(args.TotalSize >= 0);
                totalSize = args.TotalSize;
                args.WriteTo(output);
            }
コード例 #2
0
 private void OnDownloadBytes(Guid transferId, string location, out long totalSize, long offset, int length, Stream output)
 {
     DownloadBytesEventArgs args = new DownloadBytesEventArgs(transferId, location, offset, length);
     if (DownloadBytes != null)
         DownloadBytes(this, args);
     Check.Assert<InvalidOperationException>(args.TotalSize >= 0);
     totalSize = args.TotalSize;
     args.WriteTo(output);
 }