andrewlock/NetEscapades.EnumGenerators

Allow source generation for external enums

e-master opened this issue · 3 comments

First of all, thank you for this tool - it's brilliant.

Do you have any plans to allow generating sources for enums from external assemblies where we don't have control over the enum's definition?

For example to allow something like this:

[assembly:EnumExtensions(typeof(MyEnum))]

That's a good idea, I don't see why it shouldn't be possible 🙂

Thinking about this again, I think this would require rewriting the source generator significantly, as AFAICT we won't have easy access to all the details of the enum, the members etc, so I'm going to close this as won't implement for now. Thanks anyway!