public void SendAnonymousReportAsync(Exception exception, string toEmail, Guid?applicationId)
        {
            _sendRequestState = new SendRequestState
            {
                AnonymousData = new AnonymousData
                {
                    Exception     = exception,
                    ToEmail       = toEmail,
                    ApplicationID = applicationId
                }
            };

            _uploader.SendAnonymousReportCompleted += OnSendAnonymousReportCompleted;
            _uploader.SendAnonymousReportAsync(SendRequestState.GetClientLib(), _sendRequestState.GetApplication(), _sendRequestState.GetExceptionDescription(anonymous: true), _sendRequestState);
        }
        private void SendAdditionalDataAsync(Control control, SendRequestState sendRequestState)
        {
            SendRequestCompletedEventArgs e;

            try
            {
                var res = sendRequestState.SendAnonymousReportResult;
                if (res.Error != null || res.Cancelled)
                {
                    e = new SendRequestCompletedEventArgs(null, res.Error, res.Cancelled);
                }
                else
                {
                    Response response      = res.Result;
                    var      errorResponse = response as ErrorResponse;
                    if (errorResponse != null)
                    {
                        throw new Exception(errorResponse.Error);
                    }

                    if (response is NeedReportResponse)
                    {
                        _uploader.SendAdditionalDataCompleted += OnSendAdditionalDataCompleted;
                        _uploader.SendAdditionalDataAsync(response.Context, sendRequestState.GetDetailedExceptionDescription(), sendRequestState);
                        return;
                    }

                    e = new SendRequestCompletedEventArgs(response, null, false);
                }
            }
            catch (Exception ex)
            {
                e = new SendRequestCompletedEventArgs(null, ex, false);
            }
            if (control != null)
            {
                control.BeginInvoke(SendRequestCompleted, new object[] { this, e });
            }
            else
            {
                SendRequestCompleted(this, e);
            }
        }