In #63 assumes that if a composition has the [Module] attribute, then the [Provides] attribute is generated for its roots.
But controlling which attributes are added to roots would be ideal, similar to controlling modifiers via RootKinds.
I'm not sure which API is exactly realizable in terms of source generator capabilities.
Maybe something like:
DI.Setup()
.Root<IService>(
"Service",
attributes:
[
new ProvidesAttribute(),
new MethodImplAttribute(MethodImplOptions.AggressiveInlining)
]);
Note: Another RootKinds.Provides for the Module API may be a better choice.
This API will be used a lot.
In #63 assumes that if a composition has the [Module] attribute, then the [Provides] attribute is generated for its roots.
But controlling which attributes are added to roots would be ideal, similar to controlling modifiers via RootKinds.
I'm not sure which API is exactly realizable in terms of source generator capabilities.
Maybe something like:
Note: Another RootKinds.Provides for the Module API may be a better choice.
This API will be used a lot.