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; }
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; }