generated from GSM-MSG/MSG-Repository-Generator
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
Projects/Feature/ProposeMusicFeature/Sources/Assembly/ProposeMusicAssembly.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import MusicDomainInterface | ||
import Swinject | ||
|
||
public final class ProposeMusicAssembly: Assembly { | ||
public init() {} | ||
public func assemble(container: Container) { | ||
container.register(ProposeMusicFactory.self) { resolver in | ||
ProposeMusicFactoryImpl( | ||
proposeMusicUseCase: resolver.resolve(ProposeMusicUseCase.self)! | ||
) | ||
} | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Projects/Feature/ProposeMusicFeature/Sources/Factory/ProposeMusicFactory.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import BaseFeature | ||
import UIKit | ||
|
||
public protocol ProposeMusicFactory { | ||
func makeViewController() -> any StoredViewControllable | ||
} |
18 changes: 18 additions & 0 deletions
18
Projects/Feature/ProposeMusicFeature/Sources/Factory/ProposeMusicFactoryImpl.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import BaseFeature | ||
import MusicDomainInterface | ||
import UIKit | ||
|
||
struct ProposeMusicFactoryImpl: ProposeMusicFactory { | ||
private let proposeMusicUseCase: any ProposeMusicUseCase | ||
|
||
init(proposeMusicUseCase: any ProposeMusicUseCase) { | ||
self.proposeMusicUseCase = proposeMusicUseCase | ||
} | ||
|
||
func makeViewController() -> any StoredViewControllable { | ||
let store = ProposeMusicStore( | ||
proposeMusicUseCase: proposeMusicUseCase | ||
) | ||
return ProposeMusicViewController(store: store) | ||
} | ||
} |