private bool CanStrip(BuildMethod method)
        {
            if (method.IsVirtual)
            {
                return(false);
            }

            if (method.IsConstructor())
            {
                return(false);
            }

            if (method.CodeType != MethodCodeTypeFlags.CIL)
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 2
0
        public static void Change(BuildMethod method)
        {
            if (method.NameChanged)
            {
                method.Name = method.NewName;
            }

            if (method.Rename || method.IsConstructor())
            {
                foreach (var parameter in method.Parameters)
                {
                    parameter.Name = null;
                }

                foreach (var genericParameter in method.GenericParameters)
                {
                    genericParameter.Name = null;
                }
            }
        }