public bool IsMatch(TypeDefinition type)
        {
            string name = type.FullName;

            if (IsMatch(name))
            {
                return(true);
            }
            name = "0x" + TokenUtils.GetFullMetadataTokenString(type.MetadataToken);
            if (IsMatch(name))
            {
                return(true);
            }
            return(false);
        }
예제 #2
0
        public bool IsMatch(MethodDefinition method)
        {
            if (IgnoreSystemMethods && IsSystemMethod(method))
            {
                return(true);
            }
            if (IgnorePInvokeMethods && method.IsPInvokeImpl)
            {
                return(true);
            }
            if (IsExceedMaxInstructionCount(method))
            {
                return(true);
            }

            if (method.ReturnType.FullName == "System.String")
            {
                if (IgnoreMethodsWithoutParam && method.Parameters.Count == 0)
                {
                    return(true);
                }
            }

            string name = method.ToString();

            if (IsMatch(name))
            {
                return(true);
            }
            name = "0x" + TokenUtils.GetFullMetadataTokenString(method.MetadataToken);
            if (IsMatch(name))
            {
                return(true);
            }
            return(false);
        }
예제 #3
0
 private string GetTokenString(MetadataToken token)
 {
     return("0x" + TokenUtils.GetFullMetadataTokenString(token));
 }