-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.xaml.cs
33 lines (27 loc) · 966 Bytes
/
App.xaml.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
namespace lyricsBrowser
{
public partial class App : Application
{
public App()
{
InitializeComponent();
SongService songService = new SongService();
Debug.WriteLine("SongService initialized");
SongViewModel viewModel = new SongViewModel(songService);
Debug.WriteLine("SongViewModel initialized");
MainPage = new NavigationPage(new MainPage(new SongViewModel(songService)));
AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
{
if (e.ExceptionObject is Exception ex)
{
Debug.WriteLine($"Unhandled exception: {ex}");
}
};
TaskScheduler.UnobservedTaskException += (sender, e) =>
{
Debug.WriteLine($"Unobserved task exception: {e.Exception}");
e.SetObserved();
};
}
}
}