mirror of
https://github.com/mbierlee/poodinis.git
synced 2025-01-18 21:40:38 +01:00
Remove decoration
This commit is contained in:
parent
af5df7a26c
commit
a99256e03c
1 changed files with 3 additions and 3 deletions
|
@ -53,18 +53,18 @@ You can control how a dependency is resolved by specifying a creation scope duri
|
|||
* Resolve a dependency using a single instance (default):
|
||||
|
||||
```d
|
||||
dependencies.register!(ExampleClass).singleInstance();
|
||||
dependencies.register!ExampleClass.singleInstance();
|
||||
```
|
||||
* Resolve a dependency with a new instance each time it is resolved:
|
||||
|
||||
```d
|
||||
dependencies.register!(ExampleClass).newInstance();
|
||||
dependencies.register!ExampleClass.newInstance();
|
||||
```
|
||||
* Resolve a dependency using a pre-existing instance
|
||||
|
||||
```d
|
||||
auto preExistingInstance = new ExampleClass();
|
||||
dependencies.register!(ExampleClass).existingInstance(preExistingInstance);
|
||||
dependencies.register!ExampleClass.existingInstance(preExistingInstance);
|
||||
```
|
||||
|
||||
Autowiring
|
||||
|
|
Loading…
Reference in a new issue