For dependency injection purpose, I sometimes need to decorate constructor parameters with attributes. Is there a way to somehow copy the attributes defined on a field to the corresponding parameter in the primary constructor?
So this:
[PrimaryConstructor]
public partial class Apple
{
[parameter: InjectValue]
private readonly int seeds;
}
would generate:
partial class Apple
{
public Apple([InjectValue] int seeds)
{
this.seeds = seeds;
}
}