public TypeSpec CreateFromType(ITypeResolver typeResolver, Type type)
{
if (typeResolver == null)
throw new ArgumentNullException(nameof(typeResolver));
if (type == null)
throw new ArgumentNullException(nameof(type));
Type itemTypeLocal;
if (type == typeof(string) || !type.TryGetEnumerableElementType(out itemTypeLocal))
return null;
return new EnumerableTypeSpec(typeResolver, type,
CreateLazy(() => typeResolver.FromType(itemTypeLocal)));
}