mirror of
https://github.com/mbierlee/poodinis.git
synced 2024-11-15 04:04:01 +01:00
Rewrite sentence to be less confusing
This commit is contained in:
parent
6f6cd2381c
commit
1869ec2782
|
@ -93,7 +93,7 @@ dependencies.register!ExampleClassB;
|
|||
auto instance = dependencies.resolve!ExampleClassB;
|
||||
assert(instance.dependency !is null);
|
||||
```
|
||||
If an interface is to be autowired, you must register a concrete class by interface. Any class registered by concrete type can only be injected when a dependency on a concrete type is autowired.
|
||||
If an interface is to be autowired, you must register a concrete class by interface. A class registered only by concrete type can only be injected into members of that type, not its supertypes.
|
||||
|
||||
Using the UDA `OptionalDependency` you can mark an autowired member as being optional. When a member is optional, no ResolveException will be thrown when
|
||||
the type of the member is not registered and `ResolveOption.registerBeforeResolving` is not set on the container. The member will remain null or an empty array in
|
||||
|
|
Loading…
Reference in a new issue