mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Fix tutorial showing how to create a new container
Containers should be shared because they're designed to work accross threads.
This commit is contained in:
parent
851eeade45
commit
2cc8f3d68a
|
@ -7,7 +7,7 @@ The container
|
||||||
To register a class, a new dependency container must be instantiated:
|
To register a class, a new dependency container must be instantiated:
|
||||||
```d
|
```d
|
||||||
// Register a private container
|
// Register a private container
|
||||||
auto dependencies = new DependencyContainer();
|
shared(DependencyContainer) dependencies = new DependencyContainer();
|
||||||
// Or use the singleton container
|
// Or use the singleton container
|
||||||
dependencies = DependencyContainer.getInstance();
|
dependencies = DependencyContainer.getInstance();
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue