LeoColman
08/06/2019, 8:46 PMritesh
08/06/2019, 9:37 PMLeoColman
08/06/2019, 9:37 PMLeoColman
08/06/2019, 9:38 PMFoo
and the classes Boo : Foo
and Bat : Foo
, is there a way to get<Foo>()
and obtain both Boo
and Bat
?ritesh
08/06/2019, 9:40 PMLeoColman
08/06/2019, 9:41 PMmiqbaldc
08/07/2019, 2:56 AMsingle { NewRepoImpl() }
single { ViewModelNeedRepository(get<NewRepoImpl>() as Foo) }
but looks like if you mean you just want to provide a Foo
interface, and don't want to provide NewRepo()
, I think that won't be possible currently?
@LeoColmanLeoColman
08/07/2019, 2:57 AMLeoColman
08/07/2019, 2:58 AMsingle { Boo() }
single { Bat() }
...
val foos: List<Foo> = getAll<Foo>()
LeoColman
08/07/2019, 2:58 AMLeoColman
08/07/2019, 2:59 AMLeoColman
08/07/2019, 3:00 AMLeoColman
08/07/2019, 3:01 AMLeoColman
08/07/2019, 3:02 AMmiqbaldc
08/07/2019, 3:10 AMsingle { ArrayList<Foo> }
gvetri
08/07/2019, 6:39 AMsingle<MyRepositoryInterface>(named("REPOSITORY")) { MyRepositoryImpl(get(named("MyRepositoryDependency"))) }
arnaud.giuliani
08/07/2019, 7:58 AMarnaud.giuliani
08/07/2019, 8:26 AMgetAll<YourType>
from koin instancemiqbaldc
08/07/2019, 9:21 AM