forked from p15670423/monkey
Common: Document dependency resolution precedence
This commit is contained in:
parent
ab94ddeb88
commit
c3789c4766
|
@ -95,6 +95,11 @@ class DIContainer:
|
||||||
injection. Note that only positional arguments are resolved. Varargs, keyword-only args, and
|
injection. Note that only positional arguments are resolved. Varargs, keyword-only args, and
|
||||||
default values are ignored.
|
default values are ignored.
|
||||||
|
|
||||||
|
Dependencies are resolved with the following precedence
|
||||||
|
|
||||||
|
1. Conventions
|
||||||
|
2. Types, Instances
|
||||||
|
|
||||||
:param **type_**: A `type` (class) to construct
|
:param **type_**: A `type` (class) to construct
|
||||||
:return: An instance of **type_**
|
:return: An instance of **type_**
|
||||||
"""
|
"""
|
||||||
|
@ -112,6 +117,8 @@ class DIContainer:
|
||||||
that correspond `type_`'s dependencies. Note that only positional
|
that correspond `type_`'s dependencies. Note that only positional
|
||||||
arguments are resolved. Varargs, keyword-only args, and default values are ignored.
|
arguments are resolved. Varargs, keyword-only args, and default values are ignored.
|
||||||
|
|
||||||
|
See resolve() for information about dependency resolution precedence.
|
||||||
|
|
||||||
:param **type_**: A type (class) to resolve dependencies for
|
:param **type_**: A type (class) to resolve dependencies for
|
||||||
:return: An Sequence of dependencies to be injected into `type_`'s constructor
|
:return: An Sequence of dependencies to be injected into `type_`'s constructor
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue