Beispiel #1
0
        void Analyze(NameService service, ConfuserContext context, ProtectionParameters parameters, MethodDef method)
        {
            if (IsVisibleOutside(context, parameters, method.DeclaringType) &&
                (method.IsFamily || method.IsFamilyOrAssembly || method.IsPublic) &&
                IsVisibleOutside(context, parameters, method))
            {
                service.SetCanRename(method, false);
            }

            else if (method.IsRuntimeSpecialName)
            {
                service.SetCanRename(method, false);
            }

            else if (method.IsExplicitlyImplementedInterfaceMember())
            {
                service.SetCanRename(method, false);
            }

            else if (parameters.GetParameter(context, method, "forceRen", false))
            {
                return;
            }

            else if (method.DeclaringType.IsComImport() && !method.HasAttribute("System.Runtime.InteropServices.DispIdAttribute"))
            {
                service.SetCanRename(method, false);
            }

            else if (method.DeclaringType.IsDelegate())
            {
                service.SetCanRename(method, false);
            }
        }
 // Token: 0x0600000B RID: 11 RVA: 0x000040CC File Offset: 0x000022CC
 private void Analyze(NameService service, ConfuserContext context, ProtectionParameters parameters, MethodDef method)
 {
     if (method.DeclaringType.IsVisibleOutside(true) && (method.IsFamily || method.IsFamilyOrAssembly || method.IsPublic) && AnalyzePhase.IsVisibleOutside(context, parameters, method))
     {
         service.SetCanRename(method, true);
         return;
     }
     if (method.IsRuntimeSpecialName)
     {
         service.SetCanRename(method, false);
         return;
     }
     if (parameters.GetParameter <bool>(context, method, "forceRen", false))
     {
         return;
     }
     if (method.DeclaringType.IsComImport() && !method.HasAttribute("System.Runtime.InteropServices.DispIdAttribute"))
     {
         service.SetCanRename(method, false);
         return;
     }
     if (method.DeclaringType.IsDelegate())
     {
         service.SetCanRename(method, false);
     }
 }
Beispiel #3
0
        void Analyze(NameService service, ConfuserContext context, ProtectionParameters parameters, MethodDef method)
        {
            if (IsVisibleOutside(context, parameters, method.DeclaringType) &&
                (method.IsFamily || method.IsFamilyOrAssembly || method.IsPublic) &&
                IsVisibleOutside(context, parameters, method))
            {
                service.SetCanRename(method, false);
            }

            else if (method.IsRuntimeSpecialName)
            {
                service.SetCanRename(method, false);
            }

            else if (parameters.GetParameter(context, method, "forceRen", false))
            {
                return;
            }

            else if (method.DeclaringType.IsComImport() && !method.HasAttribute("System.Runtime.InteropServices.DispIdAttribute"))
            {
                service.SetCanRename(method, false);
            }

            else if (method.DeclaringType.InheritsFrom("UnityEngine.MonoBehaviour") &&
                     momoBehaviourMethods.Contains(method.Name))
            {
                service.SetCanRename(method, false);
            }

            else if (method.DeclaringType.InheritsFrom("UnityEngine.StateMachineBehaviour") &&
                     stateMachineBehaviourMethods.Contains(method.Name))
            {
                service.SetCanRename(method, false);
            }

            else if (method.DeclaringType.IsDelegate())
            {
                service.SetCanRename(method, false);
            }
        }
        void Analyze(NameService service, ConfuserContext context, ProtectionParameters parameters, MethodDef method)
        {
            if (method.DeclaringType.IsVisibleOutside() &&
                (method.IsFamily || method.IsFamilyOrAssembly || method.IsPublic) &&
                !IsVisibleOutside(context, parameters, method))
                service.SetCanRename(method, false);

            else if (method.IsRuntimeSpecialName)
                service.SetCanRename(method, false);

            else if (parameters.GetParameter(context, method, "forceRen", false))
                return;

            else if (method.DeclaringType.IsComImport() && !method.HasAttribute("System.Runtime.InteropServices.DispIdAttribute"))
                service.SetCanRename(method, false);

            else if (method.DeclaringType.IsDelegate())
                service.SetCanRename(method, false);
        }