Skip to content

Commit 2f9abab

Browse files
mgnslndhniemyjski
andauthored
Add Windows environment info collector to the WPF platform (#291)
Co-authored-by: Blake Niemyjski <[email protected]>
1 parent ad8afa6 commit 2f9abab

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Platforms/Exceptionless.Wpf/Exceptionless.Wpf.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,8 @@
4444
<Resource Include="Images\ErrorFeedback.png" />
4545
<Folder Include="Properties\" />
4646
</ItemGroup>
47+
48+
<ItemGroup Label="Source Links">
49+
<Compile Include="..\Exceptionless.Windows\ExceptionlessWindowsEnvironmentInfoCollector.cs" Link="ExceptionlessWindowsEnvironmentInfoCollector.cs" />
50+
</ItemGroup>
4751
</Project>

src/Platforms/Exceptionless.Wpf/ExceptionlessWpfExtensions.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
using Exceptionless.Dialogs;
77
using Exceptionless.Logging;
88
using Exceptionless.Plugins.Default;
9+
using Exceptionless.Services;
910
using Exceptionless.Wpf.Extensions;
1011

1112
namespace Exceptionless {
1213
public static class ExceptionlessWpfExtensions {
1314
/// <summary>
14-
/// Reads configuration settings, configures various plugins and wires up to platform specific exception handlers.
15+
/// Reads configuration settings, configures various plugins and wires up to platform specific exception handlers.
1516
/// </summary>
1617
/// <param name="client">The ExceptionlessClient.</param>
1718
/// <param name="showDialog">Controls whether a dialog is shown when an unhandled exception occurs.</param>
@@ -20,8 +21,9 @@ public static void Register(this ExceptionlessClient client, bool showDialog = t
2021
throw new ArgumentNullException(nameof(client));
2122

2223
client.Configuration.AddPlugin<SetEnvironmentUserPlugin>();
24+
client.Configuration.Resolver.Register<IEnvironmentInfoCollector, ExceptionlessWindowsEnvironmentInfoCollector>();
2325
client.Startup();
24-
26+
2527
client.RegisterApplicationDispatcherUnhandledExceptionHandler();
2628

2729
if (!showDialog)

0 commit comments

Comments
 (0)