Add PartialInject for auto call all member methods in class
- Dominant language
- C#
- Stars
- 6
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Usage (this for my personal usage to separate GraphQL schema into multiple file)
```c#
// src/Controllers/AnnotationQuery.cs
partial class Query
{
void AnnotationQuery(AnnotationService service)
{
...
}
}
// src/Schema.cs
using BatchDI.PartialDI;
partial class Query : ObjectGraph, PartialDI
{
void Query(BrokerService brokerService, AnnotationService annotationService)
{
PartialInject(); // by defaults filters: $"*{this.GetType().Name}"
PartialInject(filters: new ["*Query"]);
PartialInject(blacklist: new ["Helper1Query", "Helper2Query"]);
// by argument type
PartialInjectService(); // auto call AnnotationQuery(annotationService)
PartialInjectService(annotationService);
PartialInjectService();
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.