-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWidgetAssembler.swift
More file actions
54 lines (50 loc) · 1.78 KB
/
Copy pathWidgetAssembler.swift
File metadata and controls
54 lines (50 loc) · 1.78 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// WidgetAssembler.swift
// DevLogWidget
//
// Created by opfic on 6/8/26.
//
import DevLogCore
import DevLogData
import DevLogWidgetCore
public final class WidgetAssembler: Assembler {
public init() { }
public func assemble(_ container: any DIContainer) {
container.register(AuthSessionStateProvider.self) {
AuthSessionStateProviderImpl()
}
container.register(WidgetSyncEventBus.self) {
WidgetSyncEventBusImpl()
}
container.register(WidgetSharedDefaultsStore.self) {
WidgetSharedDefaultsStore()
}
container.register(WidgetSnapshotStore.self) {
WidgetSnapshotStore(
store: container.resolve(WidgetSharedDefaultsStore.self)
)
}
container.register(WidgetSnapshotPreferenceStore.self) {
WidgetSnapshotPreferenceStoreImpl()
}
container.register(WidgetSnapshotUpdater.self) {
WidgetSnapshotUpdaterImpl(
snapshotStore: container.resolve(WidgetSnapshotStore.self),
preferenceStore: container.resolve(WidgetSnapshotPreferenceStore.self)
)
}
container.register(WidgetSyncEventHandler.self) {
WidgetSyncEventHandler(
eventBus: container.resolve(WidgetSyncEventBus.self),
repository: container.resolve(WidgetTodoSnapshotRepository.self),
snapshotUpdater: container.resolve(WidgetSnapshotUpdater.self)
)
}
container.register(WidgetSessionSyncHandler.self) {
WidgetSessionSyncHandler(
provider: container.resolve(AuthSessionStateProvider.self),
widgetSyncEventBus: container.resolve(WidgetSyncEventBus.self)
)
}
}
}