Closed SteveDunn closed 6 months ago
This will most likely also solve: https://github.com/SteveDunn/Vogen/issues/575
This is now implemented for finding assembly level config ([VogenDefaults]
), but can't currently be used for ValueObjectAttribute
as some people derive their own attributes from them, e.g. public class IntVoAttribute : ValueObjectAttribute<int>
In C# 12, this could be aliased with using IntVo = Vogen.ValueObjectAttribute<int>;
The plan is to create an analyser that spots when something is derived, and produces a warning.
Actually, I misread the information re. C# 12 and type aliases: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-12.0/using-alias-types
We've always been able to alias a type. The next major version will be a breaking change as it is better to use a type alias. However, saying that, you can't get all of the benefits of derivation, e.g. specifying constructor parameters.
Describe the feature
Follow the incremental generator best practices to improve performance. Also use
ForAttributeWithMetadataName
instead of checking attributes manually.