My issue is with Dotfuscator configuration for renaming. Imagine a class that would look like this:
Class MyClass
{
private int _propertyA;
private int _propertyB;
public int PropertyA
{
get{return _propertyA;}
set{_propertyA = value;}
}
[Obfuscation(Feature = "renaming", Exclude = true)]
public int DestinationReference
{
get{return _propertyB;}
}
}
The obfuscated class will be written into someting like this
Class a
{
int s()
void z(int a)
public int DestinationReference
{
get{return _propertyB;}
}
}
This is my assumption from what I can see using .Net Reflector
My issue is the following: - In our code we implemented a method that look for all attributes of a class using reflection in order to find specific parameters - This method does not work in the obfuscated code as my accessor PropertyA, has been replaced with two distinct methods for the get accessor and set accessor. - I know that if I exclude an accessor from renaming it stays an accessor in the msil code and will be found by my method that looks for accessors
My question is: - Is not renaming the only option? - Is there a parameter in Dotfuscator that would allow renaming of the accessor without splitting it into two distinct methods and loosing the accessor?
I'm pretty new to obfuscation so pardon my imperfections, this is what I can see for a class similar to the one described above in reflector.
As you can see the property that is excluded from renaming stays a property with a get accessor. But for the other one that got obfuscated I can see two distinct methods s and z
I'm trying to see if there would be a way of obtaining a single accessor, renamed "s" for example with the underlying getter and setter