Skip to content

Commit

Permalink
Empty constructor of ApplicationInsightsProvider in net8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan Olsson authored and dhindrik committed Sep 23, 2024
1 parent 12e4eee commit 191c252
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions TinyInsights/ApplicationInsightsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,7 @@ void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledExceptionE
#elif NET8_0_OR_GREATER
public ApplicationInsightsProvider(string connectionString)

Check warning on line 75 in TinyInsights/ApplicationInsightsProvider.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field '_connectionString' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 75 in TinyInsights/ApplicationInsightsProvider.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field '_connectionString' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 75 in TinyInsights/ApplicationInsightsProvider.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field '_connectionString' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
{
_connectionString = connectionString;
provider = this;

AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;

void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
if (IsTrackCrashesEnabled)
{
HandleCrash((Exception)e.ExceptionObject);
}
}
// Do nothing. The net8.0 target exists for enabling unit testing, not for actual use.
}
#endif

Expand Down

0 comments on commit 191c252

Please sign in to comment.