Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Commit

Permalink
Fix PCL version of ReflectedType to use substitutable DeclaringType n…
Browse files Browse the repository at this point in the history
…ot Field/Property Type
  • Loading branch information
mythz committed Sep 29, 2014
1 parent 5216dab commit d297f73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ServiceStack.Text/ReflectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ public static Type BaseType(this Type type)
public static Type ReflectedType(this PropertyInfo pi)
{
#if (NETFX_CORE || PCL)
return pi.PropertyType;
return pi.DeclaringType;
#else
return pi.ReflectedType;
#endif
Expand All @@ -780,7 +780,7 @@ public static Type ReflectedType(this PropertyInfo pi)
public static Type ReflectedType(this FieldInfo fi)
{
#if (NETFX_CORE || PCL)
return fi.FieldType;
return fi.DeclaringType;
#else
return fi.ReflectedType;
#endif
Expand Down

0 comments on commit d297f73

Please sign in to comment.