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

Commit 11688dd

Browse files
committed
Fix build error In PCL method groups use attrType.IsInstanceOf method instead of IsInstanceOfType ext method
1 parent c3ce25b commit 11688dd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ServiceStack.Text/ReflectionExtensions.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,7 @@ public static object[] AllAttributes(this PropertyInfo propertyInfo)
11481148
public static object[] AllAttributes(this PropertyInfo propertyInfo, Type attrType)
11491149
{
11501150
#if (NETFX_CORE || PCL)
1151-
return propertyInfo.GetCustomAttributes(true).Where(attrType.IsInstanceOfType).ToArray();
1151+
return propertyInfo.GetCustomAttributes(true).Where(attrType.IsInstanceOf).ToArray();
11521152
#else
11531153
var attrs = propertyInfo.GetCustomAttributes(attrType, true);
11541154
var runtimeAttrs = propertyInfo.GetAttributes(attrType);
@@ -1190,7 +1190,7 @@ public static object[] AllAttributes(this MemberInfo memberInfo)
11901190
public static object[] AllAttributes(this ParameterInfo paramInfo, Type attrType)
11911191
{
11921192
#if (NETFX_CORE || PCL)
1193-
return paramInfo.GetCustomAttributes(true).Where(attrType.IsInstanceOfType).ToArray();
1193+
return paramInfo.GetCustomAttributes(true).Where(attrType.IsInstanceOf).ToArray();
11941194
#else
11951195
return paramInfo.GetCustomAttributes(attrType, true);
11961196
#endif
@@ -1199,7 +1199,7 @@ public static object[] AllAttributes(this ParameterInfo paramInfo, Type attrType
11991199
public static object[] AllAttributes(this MemberInfo memberInfo, Type attrType)
12001200
{
12011201
#if (NETFX_CORE || PCL)
1202-
return memberInfo.GetCustomAttributes(true).Where(attrType.IsInstanceOfType).ToArray();
1202+
return memberInfo.GetCustomAttributes(true).Where(attrType.IsInstanceOf).ToArray();
12031203
#else
12041204
return memberInfo.GetCustomAttributes(attrType, true);
12051205
#endif
@@ -1208,7 +1208,7 @@ public static object[] AllAttributes(this MemberInfo memberInfo, Type attrType)
12081208
public static object[] AllAttributes(this FieldInfo fieldInfo, Type attrType)
12091209
{
12101210
#if (NETFX_CORE || PCL)
1211-
return fieldInfo.GetCustomAttributes(true).Where(attrType.IsInstanceOfType).ToArray();
1211+
return fieldInfo.GetCustomAttributes(true).Where(attrType.IsInstanceOf).ToArray();
12121212
#else
12131213
return fieldInfo.GetCustomAttributes(attrType, true);
12141214
#endif
@@ -1226,7 +1226,7 @@ public static object[] AllAttributes(this Type type)
12261226
public static object[] AllAttributes(this Type type, Type attrType)
12271227
{
12281228
#if (NETFX_CORE || PCL)
1229-
return type.GetTypeInfo().GetCustomAttributes(true).Where(attrType.IsInstanceOfType).ToArray();
1229+
return type.GetTypeInfo().GetCustomAttributes(true).Where(attrType.IsInstanceOf).ToArray();
12301230
#else
12311231
return type.GetCustomAttributes(true).Union(type.GetRuntimeAttributes()).ToArray();
12321232
#endif

0 commit comments

Comments
 (0)