internal static Type?GetNamedType(Type type)
            {
                if (type is null)
                {
                    throw new ArgumentNullException(nameof(type));
                }

                if (BaseTypes.IsNamedType(type))
                {
                    return(type);
                }

                if (type.IsGenericType)
                {
                    Type definition = type.GetGenericTypeDefinition();
                    if (typeof(ListType <>) == definition ||
                        typeof(NonNullType <>) == definition ||
                        typeof(NativeType <>) == definition)
                    {
                        return(GetNamedType(type.GetGenericArguments()[0]));
                    }
                }

                return(null);
            }
        public void IsNonGenericBaseType(Type type, bool expectedResult)
        {
            // act
            bool result = BaseTypes.IsNonGenericBaseType(type);

            // assert
            Assert.Equal(expectedResult, result);
        }
            internal static bool IsNonGenericBaseType(Type type)
            {
                if (type is null)
                {
                    throw new ArgumentNullException(nameof(type));
                }

                return(BaseTypes.IsNonGenericBaseType(type));
            }
            internal static bool IsSchemaType(Type type)
            {
                if (BaseTypes.IsNamedType(type))
                {
                    return(true);
                }

                if (type.IsGenericType)
                {
                    Type definition = type.GetGenericTypeDefinition();
                    if (typeof(ListType <>) == definition ||
                        typeof(NonNullType <>) == definition ||
                        typeof(NativeType <>) == definition)
                    {
                        return(IsSchemaType(type.GetGenericArguments()[0]));
                    }
                }

                return(false);
            }