P_US_Holidays_NewYearsDay_English

42

DeepSea Obfuscator 2009

6 Solving problems In normal circumstances DeepSea Obfuscator 2009 will generate obfuscated assemblies that are 100% equivalent in function to the original assembly. These assemblies will run without problems.

However if you're using reflection or otherwise depend on specific names of types and/or members DeepSea Obfuscator 2009 may cause problems.

This chapter will help you solve those problems.

6.1 Reflection In the .NET framework you can use reflection to bind to types or members. Since reflection is based on specific names and cannot be fully detected by obfuscation tools (including DeepSea Obfuscator 2009) it is a common source of problems. In order to avoid this problems you must instruct DeepSea Obfuscator 2009 not to rename or cleanup the types and/or members you bind using reflection. To do so, you must exclude these types and/or members using the Obfuscation attribute.

For example to exclude type MyType from renaming and cleanup, add the following attribute to it.

[Obfuscation] internal class MyType

{ }

To exclude only a specific member in a type, you should add the attribute only to that member as shown below.

internal class MyType { [Obfuscation] internal void Foo() { /* some code */ } }

Note that the Obfuscation attribute without arguments will exclude the type or member from both renaming and cleanup.

6.2 Framework

In various cases, the .NET framework itself uses reflection on your code to accomplish some task. For example LINQ to SQL storage classes rely on reflection.

© 2009 TallApplications BV

Made with FlippingBook HTML5