/// <summary>
        /// Gets the CLR type for the associated type name.
        /// </summary>
        /// <param name="typeName">A type name.</param>
        /// <returns>A CLR type.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="typeName"/> is <c>null</c>.</exception>
        protected static Type GetClrType(Identifier typeName)
        {
            if (typeName == null)
            {
                throw new ArgumentNullException(nameof(typeName));
            }

            return(StringToClrTypeMap.ContainsKey(typeName)
                ? StringToClrTypeMap[typeName]
                : typeof(object));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the CLR type for the associated type name.
        /// </summary>
        /// <param name="typeName">A type name.</param>
        /// <returns>A CLR type for the associated database type.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="typeName"/> is <c>null</c>, empty or whitespace.</exception>
        protected static Type GetClrType(string typeName)
        {
            if (typeName.IsNullOrWhiteSpace())
            {
                throw new ArgumentNullException(nameof(typeName));
            }

            return(StringToClrTypeMap.ContainsKey(typeName)
                ? StringToClrTypeMap[typeName]
                : typeof(object));
        }