private bool IsValidType(TypeInfo typeInfo) { return(typeInfo.Namespace != nameof(System) && !IgnoredNamespaces.Any(n => typeInfo.Namespace?.StartsWith(n) ?? false) && !typeInfo.ContainsGenericParameters && !typeInfo.IsGenericType && (IgnoreTypeCallback == null || !IgnoreTypeCallback(typeInfo.AsType(), null))); }
private bool IsValidMember(MemberInfo memberInfo) { return(memberInfo != null && memberInfo.DeclaringType != null && memberInfo.DeclaringType.Namespace != nameof(System) && !IgnoredNamespaces.Any(n => memberInfo.DeclaringType.Namespace?.StartsWith(n) ?? false) && !(memberInfo.DeclaringType.GetTypeInfo()?.IsValueType ?? false) && memberInfo.Name != nameof(object.ToString) && HasValidReturnType(memberInfo) && (IgnoreTypeCallback == null || !IgnoreTypeCallback(memberInfo.DeclaringType, memberInfo))); }