This project is read-only.

Changing the auto-generation of property names

Dec 27, 2010 at 1:29 AM


  I suddenly noticed I wasn't the only one downloading the code from here! So, I want to make a change to how properties are generated. Currently, if the converter finds a method with the signature "GetXXX()" or "SetXXX()" it will create a property on the translated object called "PRXXX" with a getter or setter as appropriate. The reason for the "PR" prefex is that sometimes there is a GetXXX and the XXX already exists on the class (in particuilar, I see this for ClassName) - so that generates a conflict.

  But this is a case of an exception generating the rule. I'd been thinking I'd rather have the property called "XXX" (which works some 90% of the time) and switch over to something like "XXXPR" or similar when there is a conflict.

  This would, obviously, break everything that has gone before. So, let me know if this is a big deal!

  - Gordon.