@@ -51,6 +51,43 @@ public void SendAnonymousReportAsync(Exception exception, string toEmail, Guid?
5151 _sendRequestState . GetExceptionDescription ( true ) , _sendRequestState ) ;
5252 }
5353
54+ public string SendReportSilently ( Exception exception , string toEmail , Guid ? applicationId , string developerMessage , string from ,
55+ string userMessage , byte [ ] screenshot )
56+ {
57+ _sendRequestState = new SendRequestState
58+ {
59+ AnonymousData = new AnonymousData
60+ {
61+ Exception = exception ,
62+ ToEmail = toEmail ,
63+ ApplicationID = applicationId
64+ } ,
65+ PrivateData = new PrivateData
66+ {
67+ UserEmail = from ,
68+ UserMessage = userMessage ,
69+ DeveloperMessage = developerMessage ,
70+ Screenshot = screenshot
71+ }
72+ } ;
73+
74+ var response = _uploader . SendAnonymousReport ( SendRequestState . GetClientLib ( ) , _sendRequestState . GetApplication ( ) ,
75+ _sendRequestState . GetExceptionDescription ( true ) ) ;
76+ if ( response is ErrorResponse errorResponse )
77+ throw new Exception ( errorResponse . Error ) ;
78+
79+ if ( response is NeedReportResponse )
80+ {
81+ var additionalDataResponse = _uploader . SendAdditionalData ( response . Context ,
82+ _sendRequestState . GetDetailedExceptionDescription ( ) ) ;
83+ if ( additionalDataResponse is ErrorResponse errorAdditionalDataResponse )
84+ throw new Exception ( errorAdditionalDataResponse . Error ) ;
85+ return additionalDataResponse . UrlToProblem ;
86+ }
87+
88+ return response . UrlToProblem ;
89+ }
90+
5491 public void SendAdditionalDataAsync ( Control control , string developerMessage , string userEmail ,
5592 string userMessage , byte [ ] screenshot )
5693 {
0 commit comments