private static void EndFastCopyTo <T>(IAsyncResult fastCopyToResult) { ExecutionState <T> executionState = (ExecutionState <T>)fastCopyToResult.AsyncState; try { executionState.UpdateCompletedSynchronously(fastCopyToResult.CompletedSynchronously); MultiBufferMemoryStream multiBufferMemoryStream = (MultiBufferMemoryStream)executionState.RestCMD.SendStream; multiBufferMemoryStream.EndFastCopyTo(fastCopyToResult); Executor.EndSendStreamCopy(executionState); } catch (Exception ex) { Logger.LogWarning(executionState.OperationContext, SR.TraceUploadError, ex.Message); executionState.ExceptionRef = ExecutorBase.TranslateExceptionBasedOnParseError(ex, executionState.Cmd.CurrentResult, executionState.Resp, executionState.Cmd.ParseError); Executor.EndOperation(executionState); } }