Ejemplo n.º 1
0
 private void SendResponseSetCallback(IAsyncResult result)
 {
     try
     {
         var request  = (WebRequest)result.AsyncState;
         var response = (WebResponse)request.EndGetResponse(result);
         using (var reader = new StreamReader(response.GetResponseStream()))
         {
             _callback.Invoke(true);
         }
     }
     catch (WebException)
     {
         _callback.Invoke(false);
     }
 }
Ejemplo n.º 2
0
 private void UploadResponseSetCallback(bool result)
 {
     if (result)
     {
         using (var responseSetRepository = new ResponseSetRepository())
         {
             responseSetRepository.MarkResponseSetAsSubmitted(_responseSetIdToUpload);
         }
     }
     _uploadCallback.Invoke(result);
 }