Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update core.adoc #184

Merged
merged 1 commit into from Mar 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/core.adoc
Expand Up @@ -906,7 +906,7 @@ These methods are:
- `provider()` if you need a provider: `() -> T`.
- `factory()` if you need an instance: `(A) -> T`.

All three method can take a `tag` argument.
All three methods can take a `tag` argument.

[TIP]
====
Expand Down Expand Up @@ -1007,9 +1007,9 @@ val controller by kodein.on { requireActivity() } .newInstance { OtherController
In the next few sections, we will be describing dependency retrieval.
As you might have guessed by the title of this section, everything, in dependency retrieval, is lazy by default.

This allow:
This allows:

- Dependencies to be retrieved retrieved only when they are actually needed.
- Dependencies to be retrieved only when they are actually needed.
- "Out of context" classes such as Android Activities to access their dependencies once their contexts have been initialized.

If you want "direct" retrieval, well, there's a section named <<direct-retrieval,direct retrieval>>, how about that!
Expand Down Expand Up @@ -1061,7 +1061,7 @@ val sixSideDiceProvider: () -> Dice by kodein.provider(arg = 6)
val twentySideDice: Dice by kodein.instance(arg = 20)
----

Note that if you bound a factory with multiple argument, you need to use the `M` function to pass multiple arguments:
Note that if you bound a factory with multiple arguments, you need to use the `M` function to pass multiple arguments:

[source, kotlin]
.Example: Creating a multi-argument Dice by injecting its dependency.
Expand Down