Skip to content

Add Windows environment info collector to the WPF platform #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Platforms/Exceptionless.Wpf/Exceptionless.Wpf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,8 @@
<Resource Include="Images\ErrorFeedback.png" />
<Folder Include="Properties\" />
</ItemGroup>

<ItemGroup Label="Source Links">
<Compile Include="..\Exceptionless.Windows\ExceptionlessWindowsEnvironmentInfoCollector.cs" Link="ExceptionlessWindowsEnvironmentInfoCollector.cs" />
</ItemGroup>
</Project>
6 changes: 4 additions & 2 deletions src/Platforms/Exceptionless.Wpf/ExceptionlessWpfExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
using Exceptionless.Dialogs;
using Exceptionless.Logging;
using Exceptionless.Plugins.Default;
using Exceptionless.Services;
using Exceptionless.Wpf.Extensions;

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

client.Configuration.AddPlugin<SetEnvironmentUserPlugin>();
client.Configuration.Resolver.Register<IEnvironmentInfoCollector, ExceptionlessWindowsEnvironmentInfoCollector>();
client.Startup();

client.RegisterApplicationDispatcherUnhandledExceptionHandler();

if (!showDialog)
Expand Down