Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Dapper NET40/SqlMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2154,6 +2154,12 @@ static readonly MethodInfo
.Where(p => p.GetIndexParameters().Any() && p.GetIndexParameters()[0].ParameterType == typeof(int))
.Select(p => p.GetGetMethod()).First();

/// <summary>
/// Gets type-map for the given type
/// </summary>
/// <returns>Type map instance, default is to create new instance of DefaultTypeMap</returns>
public static Func<Type, ITypeMap> TypeMapProvider = ( Type type ) => new DefaultTypeMap( type );

/// <summary>
/// Gets type-map for the given type
/// </summary>
Expand All @@ -2170,7 +2176,7 @@ public static ITypeMap GetTypeMap(Type type)
map = (ITypeMap)_typeMaps[type];
if (map == null)
{
map = new DefaultTypeMap(type);
map = TypeMapProvider( type );
_typeMaps[type] = map;
}
}
Expand Down