the_parent = null;
int start = 0;
- TypeParameter[] parent_params = null;
- if ((the_parent != null) && the_parent.IsGeneric) {
- parent_params = the_parent.initialize_type_params ();
- start = parent_params != null ? parent_params.Length : 0;
- }
-
ArrayList list = new ArrayList ();
- if (parent_params != null)
+ if (the_parent != null && the_parent.IsGeneric) {
+ // FIXME: move generics info out of DeclSpace
+ TypeParameter[] parent_params = the_parent.PartialContainer.TypeParameters;
+ start = parent_params.Length;
list.AddRange (parent_params);
-
+ }
+
int count = type_params != null ? type_params.Length : 0;
for (int i = 0; i < count; i++) {
TypeParameter param = type_params [i];
return null;
}
+
+ public MemberInfo FindBaseEvent (Type invocationType, string name)
+ {
+ ArrayList applicable;
+ if (method_hash != null)
+ applicable = (ArrayList) method_hash [name];
+ else
+ applicable = (ArrayList) member_hash [name];
+
+ if (applicable == null)
+ return null;
+
+ //
+ // Walk the chain of events, starting from the top.
+ //
+ for (int i = applicable.Count - 1; i >= 0; i--)
+ {
+ CacheEntry entry = (CacheEntry) applicable [i];
+ if ((entry.EntryType & EntryType.Event) == 0)
+ continue;
+
+ EventInfo ei = (EventInfo)entry.Member;
+ return ei.GetAddMethod (true);
+ }
+
+ return null;
+ }
//
// This finds the method or property for us to override. invocationType is the type where