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

◆ FillEventInfoAttribute()

void System.ComponentModel.ReflectEventDescriptor.FillEventInfoAttribute ( EventInfo realEventInfo,
IList attributes )
inlineprivate

Definition at line 141 of file ReflectEventDescriptor.cs.

142 {
143 string name = realEventInfo.Name;
144 BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public;
145 Type type = realEventInfo.ReflectedType;
146 int num = 0;
147 while (type != typeof(object))
148 {
149 num++;
150 type = type.BaseType;
151 }
152 if (num <= 0)
153 {
154 return;
155 }
156 type = realEventInfo.ReflectedType;
157 Attribute[][] array = new Attribute[num][];
158 while (type != typeof(object))
159 {
160 MemberInfo @event = type.GetEvent(name, bindingAttr);
161 if (@event != null)
162 {
163 array[--num] = ReflectTypeDescriptionProvider.ReflectGetAttributes(@event);
164 }
165 type = type.BaseType;
166 }
167 Attribute[][] array2 = array;
168 foreach (Attribute[] array3 in array2)
169 {
170 if (array3 != null)
171 {
172 Attribute[] array4 = array3;
173 foreach (Attribute value in array4)
174 {
175 attributes.Add(value);
176 }
177 }
178 }
179 }
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().