private RetryOrDispatchException ( |
||
e | ||
Résultat | void |
private static void ProcessAsyncCopyRequestStreamCompletion(IAsyncResult iar) { HttpClientTransportSink.AsyncHttpClientRequestState asyncState = (HttpClientTransportSink.AsyncHttpClientRequestState)iar.AsyncState; try { StreamHelper.EndAsyncCopyStream(iar); asyncState.WebRequest.BeginGetResponse(s_processGetResponseCompletionCallback, asyncState); } catch (Exception exception) { asyncState.RetryOrDispatchException(exception); } }
private static void ProcessGetRequestStreamCompletion(IAsyncResult iar) { HttpClientTransportSink.AsyncHttpClientRequestState asyncState = (HttpClientTransportSink.AsyncHttpClientRequestState)iar.AsyncState; try { HttpWebRequest webRequest = asyncState.WebRequest; Stream requestStream = asyncState.RequestStream; Stream target = webRequest.EndGetRequestStream(iar); StreamHelper.BeginAsyncCopyStream(requestStream, target, false, true, false, true, s_processAsyncCopyRequestStreamCompletionCallback, asyncState); } catch (Exception exception) { asyncState.RetryOrDispatchException(exception); } }