/// <summary>
        /// Determines whether the data type is required to be of fixed length.
        /// </summary>
        /// <param name="typeName">The type name.</param>
        /// <returns><c>true</c> if the data type must be a fixed length.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="typeName"/> is <c>null</c>.</exception>
        protected static bool GetIsFixedLength(Identifier typeName)
        {
            if (typeName == null)
            {
                throw new ArgumentNullException(nameof(typeName));
            }

            return(FixedLengthTypes.Contains(typeName));
        }
Пример #2
0
        /// <summary>
        /// Gets the length of the is fixed.
        /// </summary>
        /// <param name="typeName">Name of the type.</param>
        /// <returns><c>true</c> if the type has a fixed length, otherwise <c>false</c>.</returns>
        /// <exception cref="ArgumentNullException"><paramref name="typeName"/> is <c>null</c>, empty or whitespace.</exception>
        protected static bool GetIsFixedLength(string typeName)
        {
            if (typeName.IsNullOrWhiteSpace())
            {
                throw new ArgumentNullException(nameof(typeName));
            }

            return(FixedLengthTypes.Contains(typeName));
        }