C# 如何防止在dotfuscator中重命名动态类型
在dotfuscator中使用重命名时遇到问题,在不排除动态类型时会发生意外行为(运行时)。如何排除使用regex的动态类型的所有方法和字段..等 抽样方法:C# 如何防止在dotfuscator中重命名动态类型,c#,c#-4.0,obfuscation,dotfuscator,C#,C# 4.0,Obfuscation,Dotfuscator,在dotfuscator中使用重命名时遇到问题,在不排除动态类型时会发生意外行为(运行时)。如何排除使用regex的动态类型的所有方法和字段..等 抽样方法: public static bool IsPropertyExist(dynamic obj, string property) { return ((IDictionary<string, object>)obj).ContainsKey(property); }
public static bool IsPropertyExist(dynamic obj, string property)
{
return ((IDictionary<string, object>)obj).ContainsKey(property);
}
private dynamic GetResult(string jobData, dynamic data)
{
....
}
公共静态bool IsPropertyExist(动态对象,字符串属性)
{
返回((IDictionary)对象).ContainsKey(属性);
}
私有动态GetResult(字符串jobData、动态数据)
{
....
}
可以通过dotfuscator配置文件,也可以通过代码中的ObfuscationAttribute
实现。谢谢,但是有很多方法的签名都是动态的,我如何通过regex实现呢?