How to skip enums?

281 views
Skip to first unread message

Eric Teutsch

unread,
Jan 14, 2011, 2:57:40 PM1/14/11
to obfu...@googlegroups.com

Hi Group,

I’m getting used to obfuscar (it seems great!), and am busy writing all the skips for public classes / methods / fields, etc.  One that I can’t figure out is how to skip a public enum which is inside a class, such as:

 

namespace blah_ns

{

   public class blah_cls

   {

      public enum blah_e

      {

         e1,

         e2

      };

   }

}

 

This does *NOT* do the trick:

 

   <SkipType name="blah_ns.blah_cls"/>

   <SkipEnum type="blah_ns.blah_cls.blah_e" attrib="public" rx=".*" />

 

Thanks for any info you can throw my way!

Eric

 

webbie

unread,
Jan 16, 2011, 11:44:50 AM1/16/11
to obfuscar
Hi Eric,

the name of a nested type and its parent type are separated by a
forward-slash. Otherwise it would not be possible to distinguish
between members and nested types.
Enums are compiled into normal classes with static fields for each
value, so

<SkipType name="blah_ns.blah_cls/blah_e"/>

would be correct. If you are not sure about a type name search the
Mapping.txt file. The name used when matching Skip* directives is the
same as in this file. (without the assembly name prefix in brackets.)

Werner
Reply all
Reply to author
Forward
0 new messages