yck1509 / ConfuserEx

An open-source, free protector for .NET applications
http://yck1509.github.io/ConfuserEx/
Other
3.57k stars 1.63k forks source link

Enum elements #152

Closed acmayberry closed 9 years ago

acmayberry commented 9 years ago

Are there plans to support renaming the elements of enums? Obfuscar seems to support this but ConfuserEx leaves them untouched.

yck1509 commented 9 years ago

It's because ConfuseEx is unable to determine whether its name would be used. For example, if ConfuserEx renames the enum elements, when you use Enum.ToString, Enum.Parse, etc., you will either get gibberish or error. Since using ToString on enums is a quite common use case, I excludes the enum fields from renaming. I believe Obfuscar just rename them and rely on users to manually exclude them. You can force ConfuserEx to rename them by using the 'forceRen' parameter.

acmayberry commented 9 years ago

Tried forceRen in the latest build, and it worked but prevented code from working.

yck1509 commented 9 years ago

Did you apply forceRen to the enum elements, or the whole module? What kind of error occured?

acmayberry commented 9 years ago

I did the whole module. I have worked it out to just the enums now. Thanks so much for your help and fast response. It is working great now.

On Tue, Jan 13, 2015 at 1:19 AM, Ki notifications@github.com wrote:

Did you apply forceRen to the enum elements, or the whole module? What kind of error occured?

— Reply to this email directly or view it on GitHub https://github.com/yck1509/ConfuserEx/issues/152#issuecomment-69700467.