File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Orm/Xtensive.Orm/Tuples/Packed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,13 @@ internal static class ValueFieldAccessorResolver
5252 private static readonly ValueFieldAccessor GuidAccessor = new GuidFieldAccessor ( ) ;
5353 private static readonly ValueFieldAccessor DateTimeOffsetAccessor = new DateTimeOffsetFieldAccessor ( ) ;
5454
55+ private sealed class TypeReferenceEqualityComparer : IEqualityComparer < Type >
56+ {
57+ public static readonly TypeReferenceEqualityComparer Instance = new ( ) ;
58+ public bool Equals ( Type x , Type y ) => ReferenceEquals ( x , y ) ;
59+ public int GetHashCode ( Type obj ) => obj . MetadataToken ^ obj . GetHashCode ( ) ;
60+ }
61+
5562 private static readonly Dictionary < Type , ValueFieldAccessor > TypeToAccessor = new ( TypeReferenceEqualityComparer . Instance )
5663 {
5764 [ WellKnownTypes . Int64 ] = Int64Accessor ,
@@ -104,13 +111,6 @@ public static ValueFieldAccessor GetValue(Type probeType) =>
104111
105112 private static ValueFieldAccessor TryResolveEnum ( Type type ) =>
106113 type . IsEnum ? TypeToAccessor . GetValueOrDefault ( Enum . GetUnderlyingType ( type ) ) : null ;
107-
108- private sealed class TypeReferenceEqualityComparer : IEqualityComparer < Type >
109- {
110- public static readonly TypeReferenceEqualityComparer Instance = new ( ) ;
111- public bool Equals ( Type x , Type y ) => ReferenceEquals ( x , y ) ;
112- public int GetHashCode ( Type obj ) => obj . MetadataToken ^ obj . GetHashCode ( ) ;
113- }
114114 }
115115
116116 internal delegate void CounterIncrementer ( ref Counters counters ) ;
You can’t perform that action at this time.
0 commit comments