Example #1
0
        public virtual bool IsIgnored(Type type)
        {
            var returnType = TypeKeyUtils.FilterNullableAndProxies(type);

            return(IsTypeIgnored(returnType) ||
                   IsTypeUnsupportedByReflector(returnType) ||
                   FasterTypeUtils.IsGenericCollection(type) && type.GetGenericArguments().Any(IsIgnored));
        }
Example #2
0
        public bool IsTypeRecognized(Type type)
        {
            var returnType = TypeKeyUtils.FilterNullableAndProxies(type);

            return(!IsTypeIgnored(returnType) &&
                   !IsTypeUnsupportedByReflector(returnType) &&
                   IsTypeWhiteListed(returnType) &&
                   (!FasterTypeUtils.IsGenericCollection(type) || type.GetGenericArguments().All(IsTypeRecognized)));
        }
Example #3
0
 private Type GetSpecificationType(Type type) =>
 FasterTypeUtils.IsGenericCollection(type)
         ? type.GetGenericTypeDefinition()
         : FasterTypeUtils.IsObjectArray(type)
             ? typeof(Array)
             : ClassStrategy.GetType(type);