Created
October 13, 2022 15:57
-
-
Save klukwist/271d01917835d5aa8cae86ac435b996d to your computer and use it in GitHub Desktop.
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
object SimpleDiScope { | |
inline fun <reified T : Any> factory(factory: InstanceType.Factory<T>) { | |
SimpleDiStorage.addFactory(factory) | |
} | |
inline fun <reified T : Any> factoryWithParams(factory: InstanceType.ParamFactory<T>) { | |
SimpleDiStorage.addFactory(factory) | |
} | |
inline fun <reified T : Any> singleton(factory: InstanceType.Factory<T>) { | |
SimpleDiStorage.addFactory(InstanceType.Singleton<T>(factory)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment