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); } }
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); }
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."); } } }