Open mrpmorris opened 1 year ago
I think I might just make it simple
@moxy
@reflect properties, methods, fields
@moxy
Where options would be
(public | non-public)? (static | instance)? (properties | methods | fields)
e.g.
properties = public instance properties
non-public properties = instance properties that are not public
public static methods = methods that are static and public
At the moment, Moxy will only re-generate source for a mix-in decorated class if
.mixin
file changesAdding/removing members does inside a C# class does not trigger a regeneration of its mix-ins, this is to enhance performance.
I want to be able to provide additional information to a mix-in about the class that it is working on. For example, it would be nice to be able to see the names of the class's properties, or only properties that are decorated with
[Required]
- but I don't want to start triggering source regeneration every time the coder alters their code on a property / method / field if there are no mix-ins that care.So, I'm considering supporting some kind of query definition in the header of a
.mixin
{{ for datum in someData }} Property {{ datum.Name }} has a min length of {{ datum.Length }} {{ end }}
This will allow me to convert the
reflect
selection to json which gives two benefitsRFC
I'd like suggestions for what the query text format might look like.
Any ideas appreciated!