Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SetMethodValue

MethodInfo System.ComponentModel.ReflectPropertyDescriptor.SetMethodValue
getprivate

Definition at line 200 of file ReflectPropertyDescriptor.cs.

201 {
202 get
203 {
205 {
206 string name = _propInfo.Name;
207 if (_setMethod == null)
208 {
209 Type baseType = _componentClass.BaseType;
210 while (baseType != null && baseType != typeof(object))
211 {
212 BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public;
213 PropertyInfo property = baseType.GetProperty(name, bindingAttr, null, PropertyType, Type.EmptyTypes, null);
214 if (property != null)
215 {
216 _setMethod = property.GetSetMethod(nonPublic: false);
217 if (_setMethod != null)
218 {
219 break;
220 }
221 }
222 baseType = baseType.BaseType;
223 }
224 }
225 _state[s_bitSetQueried] = true;
226 }
228 {
229 if (_receiverType == null)
230 {
231 if (_propInfo == null)
232 {
233 BindingFlags bindingAttr2 = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.GetProperty;
235 }
236 if (_propInfo != null)
237 {
238 _setMethod = _propInfo.GetSetMethod(nonPublic: true);
239 }
240 }
241 else
242 {
243 _setMethod = MemberDescriptor.FindMethod(_componentClass, "Set" + Name, new Type[2] { _receiverType, _type }, typeof(void));
244 }
245 _state[s_bitSetQueried] = true;
246 }
247 return _setMethod;
248 }
249 }
PropertyInfo? GetProperty(string name)
Definition Type.cs:815
Type? BaseType
Definition Type.cs:295
static readonly Type[] EmptyTypes
Definition Type.cs:19

Referenced by System.ComponentModel.ReflectPropertyDescriptor.ExtenderSetValue().