コード例 #1
0
 internal UploadBitsState(WebRequest request, Stream readStream, byte[] buffer, int chunkSize, byte[] header, byte[] footer, CompletionDelegate uploadCompletionDelegate, CompletionDelegate downloadCompletionDelegate, AsyncOperation asyncOp, System.Net.WebClient.ProgressData progress, System.Net.WebClient webClient)
 {
     this.InnerBuffer = buffer;
     this.m_ChunkSize = chunkSize;
     this.m_BufferWritePosition = 0;
     this.Header = header;
     this.Footer = footer;
     this.ReadStream = readStream;
     this.Request = request;
     this.AsyncOp = asyncOp;
     this.UploadCompletionDelegate = uploadCompletionDelegate;
     this.DownloadCompletionDelegate = downloadCompletionDelegate;
     if (this.AsyncOp != null)
     {
         this.Progress = progress;
         this.Progress.HasUploadPhase = true;
         this.Progress.TotalBytesToSend = (request.ContentLength < 0L) ? -1L : request.ContentLength;
     }
     this.WebClient = webClient;
 }
コード例 #2
0
 internal DownloadBitsState(WebRequest request, Stream writeStream, System.Net.CompletionDelegate completionDelegate, AsyncOperation asyncOp, System.Net.WebClient.ProgressData progress, System.Net.WebClient webClient)
 {
     this.WriteStream = writeStream;
     this.Request = request;
     this.AsyncOp = asyncOp;
     this.CompletionDelegate = completionDelegate;
     this.WebClient = webClient;
     this.Progress = progress;
 }