ServiceAssembly.swift 840 B

123456789101112131415161718192021
  1. import Foundation
  2. import Swinject
  3. final class ServiceAssembly: Assembly {
  4. func assemble(container: Container) {
  5. container.register(NotificationCenter.self) { _ in Foundation.NotificationCenter.default }
  6. container.register(Broadcaster.self) { _ in BaseBroadcaster() }
  7. container.register(GroupedIssueReporter.self) { _ in
  8. let reporter = CollectionIssueReporter()
  9. reporter.add(reporters: [
  10. SimpleLogReporter()
  11. ])
  12. reporter.setup()
  13. return reporter
  14. }
  15. container.register(CalendarManager.self) { r in BaseCalendarManager(resolver: r) }
  16. container.register(UserNotificationsManager.self) { r in BaseUserNotificationsManager(resolver: r) }
  17. container.register(WatchManager.self) { _ in BaseWatchManager() }
  18. }
  19. }