Skip to content

Commit

Permalink
Added documentation for sending reports via web proxy.
Browse files Browse the repository at this point in the history
  • Loading branch information
ravibpatel committed Jul 18, 2019
1 parent db69609 commit de67b0b
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 20 deletions.
4 changes: 2 additions & 2 deletions CrashReporter.NET/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.5.7.0")]
[assembly: AssemblyFileVersion("1.5.7.0")]
[assembly: AssemblyVersion("1.5.8.0")]
[assembly: AssemblyFileVersion("1.5.8.0")]
[assembly: NeutralResourcesLanguageAttribute("en")]
14 changes: 7 additions & 7 deletions CrashReporter.NET/ReportCrash.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ public class ReportCrash
/// </summary>
public bool AnalyzeWithDoctorDump = true;

/// <summary>
/// Specify a proxy for a web request.
/// </summary>
public IWebProxy WebProxy;

/// <summary>
/// Specify Doctor Dump processing settings. Used only when AnalyzeWithDoctorDump is true.
/// </summary>
Expand Down Expand Up @@ -428,7 +433,7 @@ private string CreateReport(Exception exception)

internal void SendAnonymousReport(DrDumpService.SendRequestCompletedEventHandler sendRequestCompleted)
{
_doctorDumpService = new DrDumpService(DoctorDumpSettings?.WebProxy);
_doctorDumpService = new DrDumpService(WebProxy);

_doctorDumpService.SendRequestCompleted += sendRequestCompleted;

Expand Down Expand Up @@ -457,7 +462,7 @@ private void SendFullReport(bool includeScreenshot,
}
else
{
_doctorDumpService = new DrDumpService(DoctorDumpSettings?.WebProxy);
_doctorDumpService = new DrDumpService(WebProxy);
var reportUrl =_doctorDumpService.SendReportSilently(Exception, ToEmail, DoctorDumpSettings?.ApplicationID, DeveloperMessage, from, userMessage, screenshot);
if (DoctorDumpSettings != null && DoctorDumpSettings.OpenReportInBrowser)
{
Expand All @@ -475,11 +480,6 @@ private void SendFullReport(bool includeScreenshot,
/// </summary>
public class DoctorDumpSettings
{
/// <summary>
/// Specify a proxy for a web request.
/// </summary>
public IWebProxy WebProxy;

/// <summary>
/// Gets or Sets application ID.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion CrashReporter.NET/build/CrashReporter.NET.Official.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>CrashReporter.NET.Official</id>
<version>1.5.7</version>
<version>1.5.8</version>
<title>CrashReporter.NET</title>
<authors>RBSoft</authors>
<owners>rbsoft</owners>
Expand Down
4 changes: 2 additions & 2 deletions CrashReporterTest/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ static void Main()

public static void SendReport(Exception exception, string developerMessage = "", bool silent = false)
{
var reportCrash = new ReportCrash("Email where you want to receive crash reports.")
var reportCrash = new ReportCrash("Email where you want to receive crash reports")
{
DeveloperMessage = developerMessage,
Silent = silent,
WebProxy = new WebProxy("Web proxy address, if needed"),
DoctorDumpSettings = new DoctorDumpSettings
{
WebProxy = new WebProxy("Web proxy address, if needed"),
ApplicationID = new Guid("Application ID you received from DrDump.com"),
OpenReportInBrowser = true
}
Expand Down
2 changes: 1 addition & 1 deletion CrashReporterWPFTest/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private static void CurrentDomainOnUnhandledException(object sender, UnhandledEx

public static void SendReport(Exception exception, string developerMessage = "", bool silent = true)
{
var reportCrash = new ReportCrash("Email where you want to receive crash reports.")
var reportCrash = new ReportCrash("Email where you want to receive crash reports")
{
DeveloperMessage = developerMessage,
Silent = silent
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ internal static class Program

public static void SendReport(Exception exception, string developerMessage = "", bool silent = false)
{
var reportCrash = new ReportCrash("Email where you want to receive crash reports.")
var reportCrash = new ReportCrash("Email where you want to receive crash reports")
{
DeveloperMessage = developerMessage
};
Expand Down Expand Up @@ -110,7 +110,7 @@ public partial class App : Application

public static void SendReport(Exception exception, string developerMessage = "", bool silent = false)
{
var reportCrash = new ReportCrash("Email where you want to receive crash reports.")
var reportCrash = new ReportCrash("Email where you want to receive crash reports")
{
DeveloperMessage = developerMessage
};
Expand Down Expand Up @@ -150,9 +150,17 @@ You can send crash reports silently by setting Silent property to true.
reportCrash.Silent = true;
````

### Send reports using WebProxy

You can send crash report using a web proxy by adding following line in SendReport method of Program.cs file.

````csharp
reportCrash.WebProxy = new WebProxy("Web proxy address"),
````

### Send reports to your DrDump account

You can send crash report to you doctor dump account by adding following line in ReportCrash method of Program.cs file.
You can send crash report to you doctor dump account by adding following line in SendReport method of Program.cs file.

````csharp
reportCrash.DoctorDumpSettings = new DoctorDumpSettings
Expand All @@ -165,7 +173,7 @@ Just set the ApplicationID to ID you received from DrDump.com.

### Capture whole screen instead of Application screen

You can take screenshot of whole screen instead of only application when application crashes by adding following line in ReportCrash method of Program.cs file.
You can take screenshot of whole screen instead of only application when application crashes by adding following line in SendReport method of Program.cs file.

````csharp
reportCrash.CaptureScreen = true;
Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 1.5.7.{build}
version: 1.5.8.{build}
environment:
my_version: 1.5.7
my_version: 1.5.8
my_secret:
secure: eXAIysIG8npt2tVMYQpGwTLj47CK9lUB/NyEfVGgc90=
skip_branch_with_pr: true
Expand Down Expand Up @@ -42,7 +42,7 @@ deploy:

- provider: NuGet
api_key:
secure: f061iyHEh8+Fz3+iV/c+3stBhQuyndcJMP719Eny9w6sbRfMgD1yJe+aVAYW1PJD
secure: LzLwDiKGUZvNI6CmSFpyjba1mpKYeb6o8SDBejNO0EHY1SgC8xNTuh2nzBWkY7EV
skip_symbols: false
artifact: CrashReporter.NET.Official.%my_version%.nupkg
on:
Expand Down

0 comments on commit de67b0b

Please sign in to comment.