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

Commit 92dde97

Browse files
committed
Resolve Runtime Prop attrs for PropteryInfo called as MemberInfo
1 parent 11b26f4 commit 92dde97

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ServiceStack.Text/ReflectionExtensions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,6 +1299,10 @@ public static object[] AllAttributes(this MemberInfo memberInfo, Type attrType)
12991299
#if (NETFX_CORE || PCL)
13001300
return memberInfo.GetCustomAttributes(true).Where(x => attrType.IsInstanceOf(x.GetType())).ToArray();
13011301
#else
1302+
var prop = memberInfo as PropertyInfo;
1303+
if (prop != null)
1304+
return prop.AllAttributes(attrType);
1305+
13021306
return memberInfo.GetCustomAttributes(attrType, true);
13031307
#endif
13041308
}

0 commit comments

Comments
 (0)