コード例 #1
0
        private void Process(MethodSignature methodSig, Module module, bool forceUnstrip = false)
        {
            switch (methodSig.Type)
            {
            case MethodSignatureType.CallSite:
            {
                Process(methodSig.ReturnType, module);
                Process(methodSig.Arguments, module);
            }
            break;

            case MethodSignatureType.DeclaringMethod:
            {
                Process(methodSig.CallSite, module);

                var method = methodSig.Resolve(module);
                if (method != null)
                {
                    var buildMethod = method.DeclaringMethod as BuildMethod;
                    if (buildMethod != null)
                    {
                        if (forceUnstrip)
                        {
                            UnstripAndEnqueue(buildMethod);
                        }
                        else
                        {
                            UnstripAndEnqueueEncrypted(buildMethod);
                        }
                    }
                }
                else
                {
                    Process(methodSig.Owner, module);
                }
            }
            break;

            case MethodSignatureType.GenericMethod:
            {
                Process(methodSig.DeclaringMethod, module);
                Process(methodSig.GenericArguments, module);
            }
            break;

            default:
                throw new InvalidOperationException();
            }
        }