Esempio n. 1
0
 private void CreateCompletedEventArgs(Task<HttpResponseMessage> task)
 {
     completedEventArgs = new PostSenderCompletedEventArgs();
     completedEventArgs.Success = task.IsGeneralSuccess() && task.Result.IsSuccessStatusCode;
     completedEventArgs.Result = completedEventArgs.Success
         ? task.Result.Content.ReadAsStringAsync().Result : null;
 }
Esempio n. 2
0
 protected void OnCompleted(object sender, PostSenderCompletedEventArgs e)
 {
     if (Completed != null)
     {
         Completed(sender, e);
     }
 }
 private void SendByEmail_Completed(object sender, PostSenderCompletedEventArgs e)
 {
     IsBusy = false;
     if (e.Success && e.Result == MAILEXPORT_SUCCESS_RESULT)
     {
         OnExportToEmailSuccessful();
     }
     else
     {
         OnSendingFailedDuringExportToEmail();
     }
 }