Example #1
0
        public bool IsEnableType(TypeDefinition type)
        {
            if (!type.IsPublic && !type.IsNestedPublic)
            {
                return(false);
            }

            string name = type.Name;

            if (name == "<Module>")
            {
                return(false);
            }
            if (type.CustomAttributes.Any(i => i.AttributeType.FullName == "System.Runtime.CompilerServices.CompilerGeneratedAttribute"))
            {
                return(false);
            }

            if (!whiteFilter_.IsEmpty && !whiteFilter_.IsExists(type))
            {
                return(false);
            }

            if (blackFilter_.IsExists(type))
            {
                return(false);
            }

            return(true);
        }