mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Fix incorrect fact in tutorial
This commit is contained in:
parent
d046535bdb
commit
7d206e8964
|
@ -16,10 +16,10 @@ To make dependencies available, they have to be registered:
|
||||||
```d
|
```d
|
||||||
// Register concrete class
|
// Register concrete class
|
||||||
dependencies.register!ExampleClass;
|
dependencies.register!ExampleClass;
|
||||||
// Register by interface
|
// Register by super type
|
||||||
dependencies.register!(ExampleInterface, ExampleClass);
|
dependencies.register!(ExampleInterface, ExampleClass);
|
||||||
```
|
```
|
||||||
In the above example, dependencies on the concrete class and interface will resolve an instance of class ExampleClass. Registering a class by interface does not automatically register by concrete type.
|
In the above example, dependencies on the concrete class and interface will resolve an instance of class ExampleClass. A dependency registered by super type will automatically be registered by concrete type.
|
||||||
|
|
||||||
Resolving dependencies
|
Resolving dependencies
|
||||||
----------------------
|
----------------------
|
||||||
|
|
Loading…
Reference in a new issue