Open Pschsch opened 1 year ago
Yes, good point. It's not available yet.
We could also annotate a function to let call it on onClose
, with a @OnClose
from an annotated entity:
@Single
MySingle( val myDep : MyDep ) {
@OnClose
fun oncLose(){
}
}
Is there any target version when this might be available?
for now it's a proposal, checking feasibility and impact on APIs. Seems doable for 1.4
perhaps duplication with #112
Is your feature request related to a problem? Please describe. To declare onClose callback, I should decline from using koin annotations and use pure Koin DSL
Describe the solution you'd like Add annotation @OnCloseAction. It must b applied to object declaration with corresponding function. For example:
And in actual definition:
OnCloseAction annotation could be also applied to whole module, so action will be executed for every module declaration
Describe alternatives you've considered Maybe there would be better solutions
Target Koin project koin-annotations