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

◆ FillSingleMethodAttribute()

void System.ComponentModel.ReflectEventDescriptor.FillSingleMethodAttribute ( MethodInfo realMethodInfo,
IList attributes )
inlineprivate

Definition at line 237 of file ReflectEventDescriptor.cs.

238 {
239 string name = realMethodInfo.Name;
240 BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public;
241 Type type = realMethodInfo.ReflectedType;
242 int num = 0;
243 while (type != null && type != typeof(object))
244 {
245 num++;
246 type = type.BaseType;
247 }
248 if (num <= 0)
249 {
250 return;
251 }
252 type = realMethodInfo.ReflectedType;
253 Attribute[][] array = new Attribute[num][];
254 while (type != null && type != typeof(object))
255 {
256 MemberInfo method = type.GetMethod(name, bindingAttr);
257 if (method != null)
258 {
259 array[--num] = ReflectTypeDescriptionProvider.ReflectGetAttributes(method);
260 }
261 type = type.BaseType;
262 }
263 Attribute[][] array2 = array;
264 foreach (Attribute[] array3 in array2)
265 {
266 if (array3 != null)
267 {
268 Attribute[] array4 = array3;
269 foreach (Attribute value in array4)
270 {
271 attributes.Add(value);
272 }
273 }
274 }
275 }
int Add(object? value)

References System.array, System.Reflection.MemberInfo.Name, System.Reflection.MemberInfo.ReflectedType, System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetAttributes(), System.type, and System.value.

Referenced by System.ComponentModel.ReflectEventDescriptor.FillAttributes().