private static void RegisterType(System.Type systemType, IType nhibernateType, IEnumerable<string> aliases, GetNullableTypeWithLength ctorLength) { var typeAliases = new List<string>(aliases); typeAliases.AddRange(GetClrTypeAliases(systemType)); RegisterType(nhibernateType, typeAliases, ctorLength); }
private static void RegisterType(System.Type systemType, IType nhibernateType, IEnumerable <string> aliases, GetNullableTypeWithLength ctorLength) { var typeAliases = new List <string>(aliases); typeAliases.AddRange(GetClrTypeAliases(systemType)); RegisterType(nhibernateType, typeAliases, ctorLength); }
private static NullableType GetType(NullableType defaultUnqualifiedType, int length, GetNullableTypeWithLength ctorDelegate) { string key = GetKeyForLengthBased(defaultUnqualifiedType.Name, length); IType returnType; if (!typeByTypeOfName.TryGetValue(key, out returnType)) { returnType = ctorDelegate(length); AddToTypeOfNameWithLength(key, returnType); } return((NullableType)returnType); }
private static void RegisterType(IType nhibernateType, IEnumerable <string> aliases, GetNullableTypeWithLength ctorLength) { var typeAliases = new List <string>(aliases) { nhibernateType.Name }; foreach (var alias in typeAliases) { typeByTypeOfName[alias] = nhibernateType; if (!getTypeDelegatesWithLength.TryAdd(alias, ctorLength)) { throw new HibernateException("An item with the same key has already been added to getTypeDelegatesWithLength."); } } }
private static void RegisterType(IType nhibernateType, IEnumerable <string> aliases, GetNullableTypeWithLength ctorLength) { var typeAliases = new List <string>(aliases) { nhibernateType.Name }; foreach (var alias in typeAliases) { typeByTypeOfName[alias] = nhibernateType; getTypeDelegatesWithLength.Add(alias, ctorLength); } }
private static NullableType GetType(NullableType defaultUnqualifiedType, int length, GetNullableTypeWithLength ctorDelegate) { string key = GetKeyForLengthBased(defaultUnqualifiedType.Name, length); IType returnType; if (!typeByTypeOfName.TryGetValue(key, out returnType)) { returnType = ctorDelegate(length); AddToTypeOfNameWithLength(key, returnType); } return (NullableType)returnType; }
private static void RegisterType(IType nhibernateType, IEnumerable<string> aliases, GetNullableTypeWithLength ctorLength) { var typeAliases = new List<string>(aliases) { nhibernateType.Name }; foreach (var alias in typeAliases) { typeByTypeOfName[alias] = nhibernateType; getTypeDelegatesWithLength.Add(alias, ctorLength); } }
private static void RegisterType(IType nhibernateType, IEnumerable<string> aliases, GetNullableTypeWithLength ctorLength) { var typeAliases = new List<string>(aliases) { nhibernateType.Name }; foreach (var alias in typeAliases) { typeByTypeOfName[alias] = nhibernateType; if (!getTypeDelegatesWithLength.TryAdd(alias, ctorLength)) { throw new HibernateException("An item with the same key has already been added to getTypeDelegatesWithLength."); } } }