Пример #1
0
        public static NullableType GetAnsiStringType(int length)
        {
            string key = GetKeyForLengthBased(NHibernateUtil.AnsiString.Name, length);

            IType returnType;

            if (!typeByTypeOfName.TryGetValue(key, out returnType))
            {
                returnType = new AnsiStringType(SqlTypeFactory.GetAnsiString(length));
                AddToTypeOfNameWithLength(key, returnType);
            }
            return((NullableType)returnType);
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="length"></param>
        /// <returns></returns>
        public static NullableType GetAnsiStringType(int length)
        {
            string key = GetKeyForLengthBased(NHibernateUtil.AnsiString.Name, length);

            NullableType returnType = ( NullableType )typeByTypeOfName[key];

            if (returnType == null)
            {
                returnType = new AnsiStringType(SqlTypeFactory.GetAnsiString(length));
                AddToTypeOfNameWithLength(key, returnType);
            }
            return(returnType);
        }
		public static NullableType GetAnsiStringType(int length)
		{
			string key = GetKeyForLengthBased(NHibernateUtil.AnsiString.Name, length);

			IType returnType;
			if (!typeByTypeOfName.TryGetValue(key, out returnType))
			{
				returnType = new AnsiStringType(SqlTypeFactory.GetAnsiString(length));
				AddToTypeOfNameWithLength(key, returnType);
			}
			return (NullableType)returnType;
		}
Пример #4
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="length"></param>
        /// <returns></returns>
        public static NullableType GetAnsiStringType(int length)
        {
            string key = GetKeyForLengthBased(NHibernateUtil.AnsiString.Name, length);

            NullableType returnType = (NullableType) typeByTypeOfName[key];
            if (returnType == null)
            {
                returnType = new AnsiStringType(SqlTypeFactory.GetAnsiString(length));
                AddToTypeOfNameWithLength(key, returnType);
            }
            return returnType;
        }
Пример #5
0
 public EmptyAnsiStringType()
 {
     stringType = (AnsiStringType)NHibernateUtil.AnsiString;
 }