-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Merseyside/develop
Develop
- Loading branch information
Showing
18 changed files
with
228 additions
and
41 deletions.
There are no files selected for viewing
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
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
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
124 changes: 124 additions & 0 deletions
124
...onMain/kotlin/com/merseyside/merseyLib/archy/core/presentation/di/KoinStateViewModelOf.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
//@file:OptIn(KoinInternalApi::class) | ||
// | ||
//package com.merseyside.merseyLib.archy.core.presentation.di | ||
// | ||
//import com.merseyside.merseyLib.archy.core.presentation.model.StateViewModel | ||
//import org.koin.core.annotation.KoinInternalApi | ||
//import org.koin.core.definition.BeanDefinition | ||
//import org.koin.core.module.KoinDefinition | ||
//import org.koin.core.module._scopedInstanceFactory | ||
//import org.koin.core.module.dsl.new | ||
//import org.koin.core.module.dsl.stateViewModelOf | ||
//import org.koin.core.module.dsl.setupInstance | ||
//import org.koin.dsl.ScopeDSL | ||
// | ||
//inline fun <reified R: StateViewModel> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: () -> R, | ||
// options: BeanDefinition<R>.() -> Unit | ||
//): KoinDefinition<R> = module.setupInstance(_scopedInstanceFactory(definition = { new(constructor) }, scopeQualifier = scopeQualifier), options) | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: () -> R, | ||
//): KoinDefinition<R> = scoped { new(constructor) } | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1) -> R, | ||
// options: BeanDefinition<R>.() -> Unit | ||
//): KoinDefinition<R> = module.setupInstance(_scopedInstanceFactory(definition = { new(constructor) }, scopeQualifier = scopeQualifier), options) | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1) -> R, | ||
//): KoinDefinition<R> = scoped { new(constructor) } | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1, reified T2> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1, T2) -> R, | ||
// options: BeanDefinition<R>.() -> Unit | ||
//): KoinDefinition<R> = module.setupInstance(_scopedInstanceFactory(definition = { new(constructor) }, scopeQualifier = scopeQualifier), options) | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1, reified T2> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1, T2) -> R, | ||
//): KoinDefinition<R> = scoped { new(constructor) } | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1, reified T2, reified T3> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1, T2, T3) -> R, | ||
// options: BeanDefinition<R>.() -> Unit | ||
//): KoinDefinition<R> = module.setupInstance(_scopedInstanceFactory(definition = { new(constructor) }, scopeQualifier = scopeQualifier), options) | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1, reified T2, reified T3> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1, T2, T3) -> R, | ||
//): KoinDefinition<R> = scoped { new(constructor) } | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1, reified T2, reified T3, reified T4> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1, T2, T3, T4) -> R, | ||
// options: BeanDefinition<R>.() -> Unit | ||
//): KoinDefinition<R> = module.setupInstance(_scopedInstanceFactory(definition = { new(constructor) }, scopeQualifier = scopeQualifier), options) | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1, reified T2, reified T3, reified T4> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1, T2, T3, T4) -> R, | ||
//): KoinDefinition<R> = scoped { new(constructor) } | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1, reified T2, reified T3, reified T4, reified T5> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1, T2, T3, T4, T5) -> R, | ||
// options: BeanDefinition<R>.() -> Unit | ||
//): KoinDefinition<R> = module.setupInstance(_scopedInstanceFactory(definition = { new(constructor) }, scopeQualifier = scopeQualifier), options) | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1, reified T2, reified T3, reified T4, reified T5> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1, T2, T3, T4, T5) -> R, | ||
//): KoinDefinition<R> = scoped { new(constructor) } | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1, T2, T3, T4, T5, T6) -> R, | ||
// options: BeanDefinition<R>.() -> Unit | ||
//): KoinDefinition<R> = module.setupInstance(_scopedInstanceFactory(definition = { new(constructor) }, scopeQualifier = scopeQualifier), options) | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1, T2, T3, T4, T5, T6) -> R, | ||
//): KoinDefinition<R> = scoped { new(constructor) } | ||
// | ||
///** | ||
// * @see stateViewModelOf | ||
// */ | ||
//inline fun <reified R, reified T1, reified T2, reified T3, reified T4, reified T5, reified T6, reified T7> ScopeDSL.stateViewModelOf( | ||
// crossinline constructor: (T1, T2, T3, T4, T5, T6, T7) -> R, | ||
// options: BeanDefinition<R>.() -> Unit | ||
//): KoinDefinition<R> = module.setupInstance(_scopedInstanceFactory(definition = { new(constructor) }, scopeQualifier = scopeQualifier), options) | ||
// |
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
2 changes: 2 additions & 0 deletions
2
...monMain/kotlin/com/merseyside/merseyLib/archy/core/presentation/model/ext/ViewModelExt.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
package com.merseyside.merseyLib.archy.core.presentation.model.ext | ||
|
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.