コード例 #1
0
 protected override HttpResponseMessage ProcessResponse(HttpResponseMessage response, CancellationToken cancellationToken)
 {
     if (response != null)
     {
         var wrapper = new ProgressContentWrapper(response.Content);
         wrapper.Progress += (sender, e) => OnReceiveProgress(e);
         response.Content = wrapper;
     }
     return response;
 }
コード例 #2
0
 protected override HttpRequestMessage ProcessRequest(HttpRequestMessage request, CancellationToken cancellationToken)
 {
     if (request != null)
     {
         var wrapper = new ProgressContentWrapper(request.Content);
         wrapper.Progress += (sender, e) => OnSendProgress(e);
         request.Content = wrapper;
     }
     return request;
 }