EasyJection (Dependency Injection Framework)
Max Karepin
$0.0
(no ratings)
Date |
Price |
---|---|
日期和时间 |
价钱($) |
06/09(2023) |
0.0 |
11/08(2024) |
0.0 |
Jump AssetStore
� EasyJection is an easy-to-use Dependency Injection (DI) Framework for Unity. The framework implements dependency injection without using any attributes.EasyJection implements dependency injection without using any attributes (like [inject] etc). Such an implementation avoids tying your project code to the framework. Write your code without direct dependencies on the framework itself. You will not have to include framework's namespaces everywhere.Since when the attributes (as well as the namespace) are used in your project's class, that class, at least indirectly, begins to know about where it gets its dependency from.This project is open source: https://github.com/imaxs/EasyJectionWhy use it?Dependency Injection (DI) is an intimidating word for a simple concept you're likely familiar with. Dependency Injection in simple words, is a software design concept that allows a service to be injected in a way that is completely independent of any client consumption. Dependency Injection separates the creation of a client's dependencies from the client's behavior, which allows program designs to be loosely coupled. A DI container, in pair with a good architecture, can ensure SOLID principles and help you write better code.EasyJection allows you to write much more flexible, reusable and encapsulated code.Key Features:Injection MechanismsStandard C# objects (a.k.a. POCO)Constructor injectionMethod injectionField injectionProperty injectionParameter injectionInherited from MonoBehaviourConstructor injection (as the Unity documentation says, you shouldn't implement and call constructors for MonoBehaviours. Unity automatically invokes the constructor.)Method injection (through Awake() and Start(), or other custom methods)Field injectionProperty injectionParameter injectionCan inject on non public members.Convention based binding.Conditional binding (eg. by method name, by signature, etc.)Context Aware Injection Support (dependencies can be automatically injected using the components contained in the child and parents)All platforms based on IL2CPP should be supported.