mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-23 18:12:44 +02:00
Add dependency management, AvatarViewModel and placeholder rendering now in AvatarImage.
This commit is contained in:
@@ -16,6 +16,19 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
protocol Injectable {
|
||||
var dependencies: DependencyContainer! { get }
|
||||
/**
|
||||
A protocol for classes that can be injected with a dependency container
|
||||
*/
|
||||
protocol Injectable: AnyObject {
|
||||
var dependencies: DependencyContainer! { get set }
|
||||
}
|
||||
|
||||
|
||||
extension Injectable {
|
||||
/**
|
||||
Used to inject the dependency container into an Injectable.
|
||||
*/
|
||||
func inject(dependencies: DependencyContainer) {
|
||||
self.dependencies = dependencies
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user