コード例 #1
0
		private static void RegisterType(IType nhibernateType, IEnumerable<string> aliases, GetNullableTypeWithPrecision ctorPrecision)
		{
			var typeAliases = new List<string>(aliases) { nhibernateType.Name };
			foreach (var alias in typeAliases)
			{
				typeByTypeOfName[alias] = nhibernateType;
				getTypeDelegatesWithPrecision.Add(alias, ctorPrecision);
			}
		}
コード例 #2
0
		private static void RegisterType(System.Type systemType, IType nhibernateType,
			IEnumerable<string> aliases, GetNullableTypeWithPrecision ctorPrecision)
		{
			var typeAliases = new List<string>(aliases);
			typeAliases.AddRange(GetClrTypeAliases(systemType));

			RegisterType(nhibernateType, typeAliases, ctorPrecision);
		}
コード例 #3
0
		private static void RegisterType(IType nhibernateType, IEnumerable<string> aliases, GetNullableTypeWithPrecision ctorPrecision)
		{
			var typeAliases = new List<string>(aliases) { nhibernateType.Name };
			foreach (var alias in typeAliases)
			{
				typeByTypeOfName[alias] = nhibernateType;
				if (!getTypeDelegatesWithPrecision.TryAdd(alias, ctorPrecision))
				{
					throw new HibernateException("An item with the same key has already been added to getTypeDelegatesWithPrecision.");
				}
			}
		}