@@ -1296,7 +1296,7 @@ public static object[] AllAttributes(this PropertyInfo propertyInfo)
12961296 public static object [ ] AllAttributes ( this PropertyInfo propertyInfo , Type attrType )
12971297 {
12981298#if ( NETFX_CORE || PCL || NETSTANDARD )
1299- return propertyInfo . GetCustomAttributes ( true ) . Where ( x => attrType . IsInstanceOf ( x . GetType ( ) ) ) . ToArray ( ) ;
1299+ return propertyInfo . GetCustomAttributes ( true ) . Where ( x => x . GetType ( ) . IsInstanceOf ( attrType ) ) . ToArray ( ) ;
13001300#else
13011301 var attrs = propertyInfo . GetCustomAttributes ( attrType , true ) ;
13021302 var runtimeAttrs = propertyInfo . GetAttributes ( attrType ) ;
@@ -1338,7 +1338,7 @@ public static object[] AllAttributes(this MemberInfo memberInfo)
13381338 public static object [ ] AllAttributes ( this ParameterInfo paramInfo , Type attrType )
13391339 {
13401340#if ( NETFX_CORE || PCL || NETSTANDARD )
1341- return paramInfo . GetCustomAttributes ( true ) . Where ( x => attrType . IsInstanceOf ( x . GetType ( ) ) ) . ToArray ( ) ;
1341+ return paramInfo . GetCustomAttributes ( true ) . Where ( x => x . GetType ( ) . IsInstanceOf ( attrType ) ) . ToArray ( ) ;
13421342#else
13431343 return paramInfo . GetCustomAttributes ( attrType , true ) ;
13441344#endif
@@ -1347,7 +1347,7 @@ public static object[] AllAttributes(this ParameterInfo paramInfo, Type attrType
13471347 public static object [ ] AllAttributes ( this MemberInfo memberInfo , Type attrType )
13481348 {
13491349#if ( NETFX_CORE || PCL || NETSTANDARD )
1350- return memberInfo . GetCustomAttributes ( true ) . Where ( x => attrType . IsInstanceOf ( x . GetType ( ) ) ) . ToArray ( ) ;
1350+ return memberInfo . GetCustomAttributes ( true ) . Where ( x => x . GetType ( ) . IsInstanceOf ( attrType ) ) . ToArray ( ) ;
13511351#else
13521352 var prop = memberInfo as PropertyInfo ;
13531353 if ( prop != null )
@@ -1360,7 +1360,7 @@ public static object[] AllAttributes(this MemberInfo memberInfo, Type attrType)
13601360 public static object [ ] AllAttributes ( this FieldInfo fieldInfo , Type attrType )
13611361 {
13621362#if ( NETFX_CORE || PCL || NETSTANDARD )
1363- return fieldInfo . GetCustomAttributes ( true ) . Where ( x => attrType . IsInstanceOf ( x . GetType ( ) ) ) . ToArray ( ) ;
1363+ return fieldInfo . GetCustomAttributes ( true ) . Where ( x => x . GetType ( ) . IsInstanceOf ( attrType ) ) . ToArray ( ) ;
13641364#else
13651365 return fieldInfo . GetCustomAttributes ( attrType , true ) ;
13661366#endif
0 commit comments