Now CodeGenMember attribute only supports properties, could we make it to support methods?
Also when we use CodeGenMember attribute, we MUST rewrite EVERYTHING for that property. This is quite inconvenient - sometimes we only want to change its name. Could we introduce a new kind usage so that CodeGenMember could be added to the enclosing class, using the name of its member as the first argument? (Similar syntax like decorators in typespec) like this:
[CodeGenMember(nameof(Bar), "NewBar")]
public partial class Foo
{
}
For renaming methods, it could be something like
[CodeGenMember(nameof(GetAsync), new[] {typeof(string)}, "NewGetAsync"]
public partial class Foo
{
}
Now CodeGenMember attribute only supports properties, could we make it to support methods?
Also when we use
CodeGenMemberattribute, we MUST rewrite EVERYTHING for that property. This is quite inconvenient - sometimes we only want to change its name. Could we introduce a new kind usage so thatCodeGenMembercould be added to the enclosing class, using the name of its member as the first argument? (Similar syntax like decorators in typespec) like this:For renaming methods, it could be something like