private List <MethodInfo> LookupStaticSetters(string name) { MemberInfo[] setters = UnderlyingType.GetMember(KnownStrings.Set + name, MemberTypes.Method, AttachableProperties_BF); List <MethodInfo> preferredSetters, otherSetters; PrioritizeAccessors(setters, false /*isEvent*/, false /*isGetter*/, out preferredSetters, out otherSetters); return(preferredSetters ?? otherSetters); }
private List <MethodInfo> LookupStaticAdders(string name) { string adderName = KnownStrings.Add + name + KnownStrings.Handler; MemberInfo[] adders = UnderlyingType.GetMember(adderName, MemberTypes.Method, AttachableProperties_BF); List <MethodInfo> preferredAdders, otherAdders; PrioritizeAccessors(adders, true /*isEvent*/, false /*isGetter*/, out preferredAdders, out otherAdders); return(preferredAdders ?? otherAdders); }
private PropertyInfo GetNonIndexerProperty(string name) { // Choose the most derived non-index property, in case of shadowing PropertyInfo mostDerived = null; MemberInfo[] infos = UnderlyingType.GetMember(name, MemberTypes.Property, AllProperties_BF); foreach (PropertyInfo pi in infos) { if (pi.GetIndexParameters().Length == 0) { if (mostDerived == null || mostDerived.DeclaringType.IsAssignableFrom(pi.DeclaringType)) { mostDerived = pi; } } } return(mostDerived); }