@@ -42,8 +42,6 @@ internal sealed class PropertyHelper
42
42
43
43
private static readonly ConcurrentDictionary < Type , PropertyHelper [ ] > VisiblePropertiesCache = new ( ) ;
44
44
45
- private static readonly Type IsByRefLikeAttribute = typeof ( System . Runtime . CompilerServices . IsByRefLikeAttribute ) ;
46
-
47
45
private Action < object , object ? > ? _valueSetter ;
48
46
private Func < object , object ? > ? _valueGetter ;
49
47
@@ -552,25 +550,16 @@ private static bool IsInterestingProperty(PropertyInfo property)
552
550
property . GetMethod . IsPublic &&
553
551
! property . GetMethod . IsStatic &&
554
552
555
- // PropertyHelper can't work with ref structs.
556
- ! IsRefStructProperty ( property ) &&
553
+ // PropertyHelper can't really interact with ref-struct properties since they can't be
554
+ // boxed and can't be used as generic types. We just ignore them.
555
+ //
556
+ // see: https://github.com/aspnet/Mvc/issues/8545
557
+ ! property . PropertyType . IsByRefLike &&
557
558
558
559
// Indexed properties are not useful (or valid) for grabbing properties off an object.
559
560
property . GetMethod . GetParameters ( ) . Length == 0 ;
560
561
}
561
562
562
- // PropertyHelper can't really interact with ref-struct properties since they can't be
563
- // boxed and can't be used as generic types. We just ignore them.
564
- //
565
- // see: https://github.com/aspnet/Mvc/issues/8545
566
- private static bool IsRefStructProperty ( PropertyInfo property )
567
- {
568
- return
569
- IsByRefLikeAttribute != null &&
570
- property . PropertyType . IsValueType &&
571
- property . PropertyType . IsDefined ( IsByRefLikeAttribute ) ;
572
- }
573
-
574
563
internal static class MetadataUpdateHandler
575
564
{
576
565
/// <summary>
0 commit comments