Conversation
src/TrackerCouncil.Smz3.Data/WorldData/Regions/Zelda/GanonsTower.cs
Outdated
Show resolved
Hide resolved
| private void OpenTrackerMenuItem_OnClick(object? sender, RoutedEventArgs e) | ||
| { | ||
| _service?.LaunchTracker(); | ||
| _ = _service?.LaunchTracker(); |
There was a problem hiding this comment.
I know it really doesn't matter, but C# allows for async void specifically for event handlers so you can do this with await.
There was a problem hiding this comment.
I've been doing that more, I think I just forgot here (or maybe I did it because technically the service can be null, so I'd have to make sure it's not null since I don't think C# likes nullable awaits).
That being said, I'm not sure if this is Rider specific or also a thing in Visual Studio, but it's started wanting try catches around the entire code in async void functions because unhandled exceptions can cause unexpected behaviors. (Well, unexpected in that async Task methods will typically silently fail on unhandled exceptions whereas async void methods will kill the entire application.)
Fixes #630 and various bugs from testing (there was a lot 😬). Updated the version to be a beta as I'm hoping to put something out tomorrow if Pink wants to try it out.