You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my scope is that scope(named("MyClass")) { scoped<MyClassImpl> { (id: Long) -> BotServiceImpl(id) } }
I create a instance for thes Scope like that: val scope = getKoin().createScope("MyScope", named("MyClass")) val MyClassImpl by scope.inject<MyClassImpl>{parametersOf(100L)}
If the code is starting, then i get an Error ... Can't get injected parameter #0 from DefinitionParameters[] for type 'java.lang.Long'
I don´t know why. Can anyone help me please? Thank you.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hy,
i have a class something like that
class MyClassImpl(id:Long) { }
my scope is that
scope(named("MyClass")) { scoped<MyClassImpl> { (id: Long) -> BotServiceImpl(id) } }
I create a instance for thes Scope like that:
val scope = getKoin().createScope("MyScope", named("MyClass"))
val MyClassImpl by scope.inject<MyClassImpl>{parametersOf(100L)}
If the code is starting, then i get an Error
... Can't get injected parameter #0 from DefinitionParameters[] for type 'java.lang.Long'
I don´t know why. Can anyone help me please? Thank you.
Br
Mike
Beta Was this translation helpful? Give feedback.
All reactions