private void PutValue(DbType typecode, int length, TypeDefinitionInfo value) { SortedList <int, TypeDefinitionInfo> map; if (!typeMapping.TryGetValue(typecode, out map)) { typeMapping[typecode] = map = new SortedList <int, TypeDefinitionInfo>(); } map[length] = value; }
public string Get(DbType typecode, int?length, int?scale) { TypeDefinitionInfo result = null; if (length.HasValue) { result = GetValue(typecode, length.Value); } if (result == null) { result = new TypeDefinitionInfo { TypeDefinitionPattern = GetDefaultValue(typecode), DefaultScale = null }; } return(Replace(result.TypeDefinitionPattern, length, scale ?? result.DefaultScale)); }
public string Get(DbType typecode, int? length, int? scale) { TypeDefinitionInfo result = null; if (length.HasValue) { result = GetValue(typecode, length.Value); } if (result == null) { result = new TypeDefinitionInfo { TypeDefinitionPattern = GetDefaultValue(typecode), DefaultScale = null }; } return Replace(result.TypeDefinitionPattern, length, scale ?? result.DefaultScale); }
private void PutValue(DbType typecode, int length, TypeDefinitionInfo value) { SortedList<int, TypeDefinitionInfo> map; if (!typeMapping.TryGetValue(typecode, out map)) { typeMapping[typecode] = map = new SortedList<int, TypeDefinitionInfo>(); } map[length] = value; }