Common: Document dependency resolution precedence

This commit is contained in:
Mike Salvatore 2022-06-16 09:02:10 -04:00
parent ab94ddeb88
commit c3789c4766
1 changed files with 7 additions and 0 deletions

View File

@ -95,6 +95,11 @@ class DIContainer:
injection. Note that only positional arguments are resolved. Varargs, keyword-only args, and
default values are ignored.
Dependencies are resolved with the following precedence
1. Conventions
2. Types, Instances
:param **type_**: A `type` (class) to construct
:return: An instance of **type_**
"""
@ -112,6 +117,8 @@ class DIContainer:
that correspond `type_`'s dependencies. Note that only positional
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
:return: An Sequence of dependencies to be injected into `type_`'s constructor
"""