Xamarin表单中使用ConfuserEx的声明性模糊处理
我正在使用Xamarin.Forms创建一个Android应用程序,我正在用ConfuserEx混淆这些表单。我想像这样使用声明性模糊处理,这样就可以更改每个类的模糊处理属性 但是,Xamarin.Forms中的System.Reflection命名空间无法识别System.Reflection.ObfuscationAttribute类。我是否需要使用另一个NuGet软件包,或者我遗漏了什么 否则,有没有办法以不同的方式在不同的类中包含或排除混淆功能?ConfuserEx只查看属性的名称:Xamarin表单中使用ConfuserEx的声明性模糊处理,xamarin,xamarin.android,xamarin.forms,obfuscation,confuserex,Xamarin,Xamarin.android,Xamarin.forms,Obfuscation,Confuserex,我正在使用Xamarin.Forms创建一个Android应用程序,我正在用ConfuserEx混淆这些表单。我想像这样使用声明性模糊处理,这样就可以更改每个类的模糊处理属性 但是,Xamarin.Forms中的System.Reflection命名空间无法识别System.Reflection.ObfuscationAttribute类。我是否需要使用另一个NuGet软件包,或者我遗漏了什么 否则,有没有办法以不同的方式在不同的类中包含或排除混淆功能?ConfuserEx只查看属性的名称: i
if (ca.TypeFullName != "System.Reflection.ObfuscationAttribute")
因此,我只需要在PCL Xamarin.Forms项目本身中创建一个System.Reflection.ObfuscationAttribute类
i、 e
Re:我尝试使用此方法将重命名功能添加到类中,但没有改变任何内容。我是否需要在.crproj文件中放入任何内容,以便ConfuserEx识别我也在使用声明性模糊处理?
using System.Runtime.InteropServices;
namespace System.Reflection
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate, AllowMultiple = true, Inherited = false), ComVisible(true)]
public sealed class ObfuscationAttribute : Attribute
{
//
// Fields
//
private bool m_strip = true;
private bool m_exclude = true;
private bool m_applyToMembers = true;
private string m_feature = "all";
//
// Properties
//
public bool ApplyToMembers
{
get
{
return this.m_applyToMembers;
}
set
{
this.m_applyToMembers = value;
}
}
public bool Exclude
{
get
{
return this.m_exclude;
}
set
{
this.m_exclude = value;
}
}
public string Feature
{
get
{
return this.m_feature;
}
set
{
this.m_feature = value;
}
}
public bool StripAfterObfuscation
{
get
{
return this.m_strip;
}
set
{
this.m_strip = value;
}
}
}
}