Skip to content

refactor: replace manual bootstrap with DI container#19

Merged
jaybarden1 merged 1 commit into
mainfrom
refactor/di-config
Apr 22, 2026
Merged

refactor: replace manual bootstrap with DI container#19
jaybarden1 merged 1 commit into
mainfrom
refactor/di-config

Conversation

@jaybarden1

Copy link
Copy Markdown
Contributor

Static App.* service accessors removed. BootstrapAsync now builds a Microsoft.Extensions.DependencyInjection ServiceProvider; all services registered in ServiceCollectionExtensions.AddOneDriveSyncServices.

SettingsService pre-loaded before container build (async factory constraint) then registered as a singleton instance. ServiceProvider disposed on app exit, which propagates to IAsyncDisposable singletons (SyncScheduler). All lifetimes are Singleton except MainWindowViewModel (Transient).

Static App.* service accessors removed. BootstrapAsync now builds a
Microsoft.Extensions.DependencyInjection ServiceProvider; all services
registered in ServiceCollectionExtensions.AddOneDriveSyncServices.

SettingsService pre-loaded before container build (async factory
constraint) then registered as a singleton instance. ServiceProvider
disposed on app exit, which propagates to IAsyncDisposable singletons
(SyncScheduler). All lifetimes are Singleton except MainWindowViewModel
(Transient).
@jaybarden1 jaybarden1 enabled auto-merge (squash) April 22, 2026 19:02
@jaybarden1 jaybarden1 merged commit 44f57d1 into main Apr 22, 2026
7 of 10 checks passed
@jaybarden1 jaybarden1 deleted the refactor/di-config branch April 22, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants