Closed AlonTalmi closed 8 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
vcontainer | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Nov 15, 2023 11:16am |
Thank you. Probably useful.
However, I don't think the name NonLazy is very clear.
If it is not resolved from anywhere and an Instance is created, it is nothing more than an entry point in the broadest sense.
So I have only allowed APIs that specifically specify the type of entry point, such as RegisterEntryPoint
or RegisterComponent
.
Maybe it's the same with ASP . NET Core, for example AddControllers, AddHostedService, etc. I prefer that approach.
I added a simple extension method that registers a build callback that resolves the type requested.
Unlike Zenject and other similar DI libraries where NoneLazy is marked during the registration phase here it's controlled in the container level. I personally like it, but can see why you might not.
Anyway, I also added a Unit Test.