mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Alter tutorial do put less emphasis on registration scopes
This commit is contained in:
parent
2ebef4c466
commit
aa8aef5c06
|
@ -41,9 +41,9 @@ auto exampleClassInstance = dependencies.resolve!ExampleInterface;
|
||||||
auto exampleClassInstance2 = dependencies.resolve!ExampleClass; // A ResolveException is thrown
|
auto exampleClassInstance2 = dependencies.resolve!ExampleClass; // A ResolveException is thrown
|
||||||
```
|
```
|
||||||
|
|
||||||
Dependency scopes
|
Dependency creation behaviour
|
||||||
-----------------
|
-----------------
|
||||||
With dependency scopes, you can control how a dependency is resolved. The scope determines which instance is returned, be it the same each time or a new one. The following scopes are available:
|
You can control how a dependency is resolved by specifying a creation scope during registration. The scope determines which instance is returned, be it the same each time or a new one. The following scopes are available:
|
||||||
|
|
||||||
* Resolve a dependency using a single instance (default):
|
* Resolve a dependency using a single instance (default):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue