feat: new ValueProvider improvements and source generator.

This commit is contained in:
redglow
2026-07-20 11:06:35 +02:00
parent 036e4af431
commit c540b99eb6
12 changed files with 79 additions and 37 deletions
+28 -1
View File
@@ -15,4 +15,31 @@ TOC:
- deep dive into why it's all done at composition root
- using extension methods to split the code as necessary
- sending data into a scope
- initializing data in the scope
- initializing data in the scope
NOTES
field with \[Inject\] or method with \[Inject\] automatically receive injection IF they are between the injected objects
of a ServiceSource
a method with \[WithProvider\] generates a companion method for unwrapping provider. E.g.:
```csharp
[WithProvider]
private void OnReady(IService1 service1, IService2 service2)
{
// ...
}
```
will generate a companion method similar to:
```csharp
private void OnReadyWithProvider(IProvider provider)
{
OnReady(
provider.Get<IService1>(),
provider.Get<IService2>()
);
}
```