From de67b0b69140e73356d5c765290b8800177a7e79 Mon Sep 17 00:00:00 2001 From: Ravi Patel Date: Thu, 18 Jul 2019 18:14:58 +0530 Subject: [PATCH] Added documentation for sending reports via web proxy. --- CrashReporter.NET/Properties/AssemblyInfo.cs | 4 ++-- CrashReporter.NET/ReportCrash.cs | 14 +++++++------- .../build/CrashReporter.NET.Official.nuspec | 2 +- CrashReporterTest/Program.cs | 4 ++-- CrashReporterWPFTest/App.xaml.cs | 2 +- README.md | 16 ++++++++++++---- appveyor.yml | 6 +++--- 7 files changed, 28 insertions(+), 20 deletions(-) diff --git a/CrashReporter.NET/Properties/AssemblyInfo.cs b/CrashReporter.NET/Properties/AssemblyInfo.cs index 4f45665..0c8d058 100644 --- a/CrashReporter.NET/Properties/AssemblyInfo.cs +++ b/CrashReporter.NET/Properties/AssemblyInfo.cs @@ -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")] diff --git a/CrashReporter.NET/ReportCrash.cs b/CrashReporter.NET/ReportCrash.cs index b9383bf..8f0af78 100644 --- a/CrashReporter.NET/ReportCrash.cs +++ b/CrashReporter.NET/ReportCrash.cs @@ -89,6 +89,11 @@ public class ReportCrash /// public bool AnalyzeWithDoctorDump = true; + /// + /// Specify a proxy for a web request. + /// + public IWebProxy WebProxy; + /// /// Specify Doctor Dump processing settings. Used only when AnalyzeWithDoctorDump is true. /// @@ -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; @@ -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) { @@ -475,11 +480,6 @@ private void SendFullReport(bool includeScreenshot, /// public class DoctorDumpSettings { - /// - /// Specify a proxy for a web request. - /// - public IWebProxy WebProxy; - /// /// Gets or Sets application ID. /// diff --git a/CrashReporter.NET/build/CrashReporter.NET.Official.nuspec b/CrashReporter.NET/build/CrashReporter.NET.Official.nuspec index 75f46b6..f49c4a2 100644 --- a/CrashReporter.NET/build/CrashReporter.NET.Official.nuspec +++ b/CrashReporter.NET/build/CrashReporter.NET.Official.nuspec @@ -2,7 +2,7 @@ CrashReporter.NET.Official - 1.5.7 + 1.5.8 CrashReporter.NET RBSoft rbsoft diff --git a/CrashReporterTest/Program.cs b/CrashReporterTest/Program.cs index f2a534e..744d2e7 100644 --- a/CrashReporterTest/Program.cs +++ b/CrashReporterTest/Program.cs @@ -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 } diff --git a/CrashReporterWPFTest/App.xaml.cs b/CrashReporterWPFTest/App.xaml.cs index 1c34596..cda0f1f 100644 --- a/CrashReporterWPFTest/App.xaml.cs +++ b/CrashReporterWPFTest/App.xaml.cs @@ -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 diff --git a/README.md b/README.md index 0ceaa51..fe4ad0e 100644 --- a/README.md +++ b/README.md @@ -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 }; @@ -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 }; @@ -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 @@ -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; diff --git a/appveyor.yml b/appveyor.yml index 54930d5..3e9fb5c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 @@ -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: