If you are looking for solutions for building time, the simplest one might be generating code through reflection, but I don't know anything out of the box.
I'm not sure what you mean by accessing the property name in a safe way; you can create a static name / class map at build time and check for it.
It looks like you are trying to get the property name from a specific class, but there is nothing particularly interesting about this - you can handle it with normal reflection, since you must specify the class from which you can get properties from.
source share