This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,13 @@ static TypeFields()
65
65
}
66
66
}
67
67
}
68
+
69
+ public static TypeFieldInfo GetAccessor ( string propertyName )
70
+ {
71
+ return Instance . FieldsMap . TryGetValue ( propertyName , out TypeFieldInfo info )
72
+ ? info
73
+ : null ;
74
+ }
68
75
}
69
76
70
77
public abstract class TypeFields
@@ -96,6 +103,13 @@ public static TypeFields Get(Type type)
96
103
return instance ;
97
104
}
98
105
106
+ public TypeFieldInfo GetAccessor ( string propertyName )
107
+ {
108
+ return FieldsMap . TryGetValue ( propertyName , out TypeFieldInfo info )
109
+ ? info
110
+ : null ;
111
+ }
112
+
99
113
public Type Type { get ; protected set ; }
100
114
101
115
public readonly Dictionary < string , TypeFieldInfo > FieldsMap =
Original file line number Diff line number Diff line change @@ -58,6 +58,13 @@ static TypeProperties()
58
58
}
59
59
}
60
60
}
61
+
62
+ public static TypePropertyInfo GetAccessor ( string propertyName )
63
+ {
64
+ return Instance . PropertyMap . TryGetValue ( propertyName , out TypePropertyInfo info )
65
+ ? info
66
+ : null ;
67
+ }
61
68
}
62
69
63
70
public abstract class TypeProperties
@@ -89,6 +96,13 @@ public static TypeProperties Get(Type type)
89
96
return instance ;
90
97
}
91
98
99
+ public TypePropertyInfo GetAccessor ( string propertyName )
100
+ {
101
+ return PropertyMap . TryGetValue ( propertyName , out TypePropertyInfo info )
102
+ ? info
103
+ : null ;
104
+ }
105
+
92
106
public Type Type { get ; protected set ; }
93
107
94
108
public readonly Dictionary < string , TypePropertyInfo > PropertyMap =
You can’t perform that action at this time.
0 commit comments