Beispiel #1
0
        private static TypeInfo CreateInternal(
            IExtendedType type,
            Type originalType,
            TypeCache cache)
        {
            if (SchemaType.TryCreateTypeInfo(
                    type,
                    originalType,
                    out TypeInfo? typeInfo))
            {
                return(typeInfo);
            }

            if (RuntimeType.TryCreateTypeInfo(
                    type,
                    originalType,
                    cache,
                    out typeInfo))
            {
                return(typeInfo);
            }

            throw new InvalidOperationException("Unable to create type info.");
        }