Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何防止在dotfuscator中重命名动态类型_C#_C# 4.0_Obfuscation_Dotfuscator - Fatal编程技术网

C# 如何防止在dotfuscator中重命名动态类型

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); }

在dotfuscator中使用重命名时遇到问题,在不排除动态类型时会发生意外行为(运行时)。如何排除使用regex的动态类型的所有方法和字段..等

抽样方法:

 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实现呢?