Skip to content

Commit e68c1f8

Browse files
committed
Fixing GetSource and GetTarget type checks
1 parent 0e8d25b commit e68c1f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

AgileMapper/Members/MappingInstanceData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected MappingInstanceData(
3535

3636
T IMappingData.GetSource<T>()
3737
{
38-
if (typeof(T).IsAssignableTo(typeof(TSource)))
38+
if (typeof(TSource).IsAssignableTo(typeof(T)))
3939
{
4040
return (T)((object)Source);
4141
}
@@ -45,7 +45,7 @@ T IMappingData.GetSource<T>()
4545

4646
T IMappingData.GetTarget<T>()
4747
{
48-
if (typeof(T).IsAssignableTo(typeof(TTarget)))
48+
if (typeof(TTarget).IsAssignableTo(typeof(T)))
4949
{
5050
return (T)((object)Target);
5151
}

0 commit comments

Comments
 (0)