mirror of
https://github.com/InsanusMokrassar/SDI.git
synced 2024-11-27 04:28:53 +00:00
Update 'README.md'
This commit is contained in:
parent
473fe3aec9
commit
9f12160170
11
README.md
11
README.md
@ -40,8 +40,6 @@ dependencies {
|
|||||||
|
|
||||||
Last version shown here: [ ![Download](https://api.bintray.com/packages/insanusmokrassar/InsanusMokrassar/sdi/images/download.svg) ](https://bintray.com/insanusmokrassar/InsanusMokrassar/sdi/_latestVersion)
|
Last version shown here: [ ![Download](https://api.bintray.com/packages/insanusmokrassar/InsanusMokrassar/sdi/images/download.svg) ](https://bintray.com/insanusmokrassar/InsanusMokrassar/sdi/_latestVersion)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Format of config
|
## Format of config
|
||||||
|
|
||||||
Full examples of usage you can find in [tests](src/commonTest/kotlin/com/insanusmokrassar/sdi). In two words, there are
|
Full examples of usage you can find in [tests](src/commonTest/kotlin/com/insanusmokrassar/sdi). In two words, there are
|
||||||
@ -104,6 +102,15 @@ And with config for this library:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Kotlin code will be:
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
val module = Json.plain.parse(Module.serializer(), input)
|
||||||
|
val businessService = (module["service"] as BusinessService)
|
||||||
|
```
|
||||||
|
|
||||||
|
Here `input` is a json of configuration.
|
||||||
|
|
||||||
List example you can find in
|
List example you can find in
|
||||||
[this test](https://git.insanusmokrassar.com/InsanusMokrassar/SDI/src/master/src/commonTest/kotlin/com/insanusmokrassar/sdi/ListTest.kt).
|
[this test](https://git.insanusmokrassar.com/InsanusMokrassar/SDI/src/master/src/commonTest/kotlin/com/insanusmokrassar/sdi/ListTest.kt).
|
||||||
Besides, usually you can create objects inside of places where expected something like dependency injection directly. In
|
Besides, usually you can create objects inside of places where expected something like dependency injection directly. In
|
||||||
|
Loading…
Reference in New Issue
Block a user