33using FinTrackForWindows . Services ;
44using FinTrackForWindows . Services . Accounts ;
55using FinTrackForWindows . Services . Api ;
6+ using FinTrackForWindows . Services . AppInNotifications ;
67using FinTrackForWindows . Services . Budgets ;
78using FinTrackForWindows . Services . Camera ;
89using FinTrackForWindows . Services . Currencies ;
910using FinTrackForWindows . Services . Debts ;
1011using FinTrackForWindows . Services . Memberships ;
12+ using FinTrackForWindows . Services . Reports ;
1113using FinTrackForWindows . Services . Transactions ;
14+ using FinTrackForWindows . Services . Users ;
1215using FinTrackForWindows . ViewModels ;
1316using FinTrackForWindows . Views ;
1417using Microsoft . Extensions . DependencyInjection ;
@@ -88,8 +91,12 @@ private void ConfigureServices(IServiceCollection services)
8891 services . AddSingleton < ICurrenciesStore , CurrenciesStore > ( ) ;
8992 services . AddSingleton < IMembershipStore , MembershipStore > ( ) ;
9093 services . AddSingleton < IDebtStore , DebtStore > ( ) ;
94+ services . AddSingleton < IReportStore , ReportStore > ( ) ;
95+ services . AddSingleton < IUserStore , UserStore > ( ) ;
9196
9297 services . AddTransient < ICameraService , CameraService > ( ) ;
98+
99+ services . AddSingleton < IAppInNotificationService , AppInNotificationService > ( ) ;
93100 }
94101
95102 protected override async void OnStartup ( StartupEventArgs e )
@@ -126,11 +133,17 @@ private void SetupGlobalExceptionHandling()
126133
127134 protected override async void OnExit ( ExitEventArgs e )
128135 {
136+ var notificationService = _host . Services . GetService < IAppInNotificationService > ( ) ;
137+ notificationService ? . Dispose ( ) ;
138+
129139 using ( _host )
130140 {
131141 await _host . StopAsync ( TimeSpan . FromSeconds ( 5 ) ) ;
142+ _host . Dispose ( ) ;
132143 }
144+
133145 base . OnExit ( e ) ;
134146 }
147+
135148 }
136149}
0 commit comments