Home - Forums-.NET - Spices.Net - Spices Obfuscator setting to NOT obfuscate certain classes?

Spices.Net

NET code security, tools to protect, obfuscate, tamper defense, code and data safety, recover, convert, optimize, explore, browse and analyze .Net software.

This forum related to following products: Spices.Net Suite, Spices.Net Obfuscator, Spices.Net Decompiler

Spices Obfuscator setting to NOT obfuscate certain classes?
Link Posted: 08-Nov-2006 03:30
Hi,

I was looking for an option to exclude some portions of my code (i.e. the printer class) from obfuscation?
Link Posted: 08-Nov-2006 08:11
You can do this by following ways:
1. Mark excluded members (class and its properties for example) by NotObfuscateAttribute , osurce of this attribute you can find in the \\SDK folder of Spices.Net installation. You can change visiblity of obfuscation attributes and include whole file or portions into your code to use obfuscation attributes to declare to leave or obfuscate members of your assembly.
2. Use string patterns (RegEx patterns) to exclude assembly members. You can use Spices.Project.ExclusionPatterns collection for these purposes.
or NotObfuscateMembersAttribute
For example:
[c#]
namespace MyNamespace
{
  public class MyClass
  {
     internal int myField;
     public int MyProperty { get {return myField;} set { myField = value;}}
  }
}


If you will use \"MyNamespace*\" pattern - MyClass and its members will no obfuscated, if you will use \"MyNamespace.MyClass.*\" - MyClass can be obfuscated, but its members will excluded from obfuscation.