feat: new ValueProvider improvements and source generator.
This commit is contained in:
@@ -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>()
|
||||
);
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user