|
21 | 21 | import DataSource |
22 | 22 | import SwiftUI |
23 | 23 |
|
24 | | -public final class AppDependencies: Sendable { |
25 | | - public let appStateClient: AppStateClient |
26 | | - public let cgDirectDisplayClient: CGDirectDisplayClient |
27 | | - public let executeClient: ExecuteClient |
28 | | - public let hiServicesClient: HIServicesClient |
29 | | - public let loggingSystemClient: LoggingSystemClient |
30 | | - public let nsAppClient: NSAppClient |
31 | | - public let nsScreenClient: NSScreenClient |
32 | | - public let nsWorkspaceClient: NSWorkspaceClient |
33 | | - public let smAppServiceClient: SMAppServiceClient |
34 | | - public let spiceKeyClient: SpiceKeyClient |
35 | | - public let spuUpdaterClient: SPUUpdaterClient |
36 | | - public let userDefaultsClient: UserDefaultsClient |
37 | | - public let windowSceneMessengerClient: WindowSceneMessengerClient |
38 | | - |
39 | | - nonisolated init( |
40 | | - appStateClient: AppStateClient = .liveValue, |
41 | | - cgDirectDisplayClient: CGDirectDisplayClient = .liveValue, |
42 | | - executeClient: ExecuteClient = .liveValue, |
43 | | - hiServicesClient: HIServicesClient = .liveValue, |
44 | | - loggingSystemClient: LoggingSystemClient = .liveValue, |
45 | | - nsAppClient: NSAppClient = .liveValue, |
46 | | - nsScreenClient: NSScreenClient = .liveValue, |
47 | | - nsWorkspaceClient: NSWorkspaceClient = .liveValue, |
48 | | - smAppServiceClient: SMAppServiceClient = .liveValue, |
49 | | - spiceKeyClient: SpiceKeyClient = .liveValue, |
50 | | - spuUpdaterClient: SPUUpdaterClient = .liveValue, |
51 | | - userDefaultsClient: UserDefaultsClient = .liveValue, |
52 | | - windowSceneMessengerClient: WindowSceneMessengerClient = .liveValue |
53 | | - ) { |
54 | | - self.appStateClient = appStateClient |
55 | | - self.cgDirectDisplayClient = cgDirectDisplayClient |
56 | | - self.executeClient = executeClient |
57 | | - self.hiServicesClient = hiServicesClient |
58 | | - self.loggingSystemClient = loggingSystemClient |
59 | | - self.nsAppClient = nsAppClient |
60 | | - self.nsScreenClient = nsScreenClient |
61 | | - self.nsWorkspaceClient = nsWorkspaceClient |
62 | | - self.smAppServiceClient = smAppServiceClient |
63 | | - self.spiceKeyClient = spiceKeyClient |
64 | | - self.spuUpdaterClient = spuUpdaterClient |
65 | | - self.userDefaultsClient = userDefaultsClient |
66 | | - self.windowSceneMessengerClient = windowSceneMessengerClient |
67 | | - } |
| 24 | +public struct AppDependencies: Sendable { |
| 25 | + public var appStateClient = AppStateClient.liveValue |
| 26 | + public var cgDirectDisplayClient = CGDirectDisplayClient.liveValue |
| 27 | + public var executeClient = ExecuteClient.liveValue |
| 28 | + public var hiServicesClient = HIServicesClient.liveValue |
| 29 | + public var loggingSystemClient = LoggingSystemClient.liveValue |
| 30 | + public var nsAppClient = NSAppClient.liveValue |
| 31 | + public var nsScreenClient = NSScreenClient.liveValue |
| 32 | + public var nsWorkspaceClient = NSWorkspaceClient.liveValue |
| 33 | + public var smAppServiceClient = SMAppServiceClient.liveValue |
| 34 | + public var spiceKeyClient = SpiceKeyClient.liveValue |
| 35 | + public var spuUpdaterClient = SPUUpdaterClient.liveValue |
| 36 | + public var userDefaultsClient = UserDefaultsClient.liveValue |
| 37 | + public var windowSceneMessengerClient = WindowSceneMessengerClient.liveValue |
68 | 38 |
|
69 | 39 | static let shared = AppDependencies() |
70 | 40 | } |
|
0 commit comments