mirror of
https://github.com/DCFApixels/DragonECS-AutoInjections.git
synced 2026-04-21 14:55:54 +08:00
update readme
This commit is contained in:
parent
b326398e00
commit
8471b50c0f
@ -222,6 +222,7 @@ class VelocitySystem : IEcsRun, IEcsInject<EcsDefaultWorld>, IEcsInject<TimeServ
|
||||
|
||||
</details>
|
||||
|
||||
</br>
|
||||
|
||||
# Не null инъекции
|
||||
|
||||
@ -232,3 +233,8 @@ class VelocitySystem : IEcsRun, IEcsInject<EcsDefaultWorld>, IEcsInject<TimeServ
|
||||
> Переданный тип должен иметь конструктор без параметров и быть либо того же типа, что и поле, либо производным от него.
|
||||
|
||||
Расширение также сообщит, если после завершения предварительной инъекции остались непроинициализированные поля с атрибутом `[DI]`.
|
||||
|
||||
</br>
|
||||
|
||||
# Лицензия
|
||||
MIT Лицензия: [Открыть](LICENSE.md)
|
||||
@ -225,10 +225,16 @@ class VelocitySystem : IEcsRun, IEcsInject<EcsDefaultWorld>, IEcsInject<TimeServ
|
||||
|
||||
</details>
|
||||
|
||||
</br>
|
||||
|
||||
# Non-null injections
|
||||
To ensure a field marked with `[DI]` is initialized even if injection does not occur, pass a fallback type to the attribute constructor. In the example below the field `Foo` will receive the injected `Foo` instance or an instance of `FooDummy : Foo` if injection was not performed.
|
||||
|
||||
> The provided type must have a parameterless constructor and be either the same type as the field or derived from it.
|
||||
|
||||
The extension will also report if any `[DI]`-marked fields remain uninitialized after the pre-injection phase.
|
||||
The extension will also report if any `[DI]`-marked fields remain uninitialized after the pre-injection phase.
|
||||
|
||||
</br>
|
||||
|
||||
# License
|
||||
The MIT License: [Open](LICENSE.md)
|
||||
Loading…
Reference in New Issue
Block a user