public override MemberInfo[] GetMember(String name, BindingFlags bindingAttr) { bool lookForInstanceMembers = (bindingAttr & BindingFlags.Instance) != 0; SimpleHashtable lookupTable = lookForInstanceMembers ? this.instanceMembers : this.staticMembers; Object ob = lookupTable[name]; if (ob == null) { if ((bindingAttr & BindingFlags.IgnoreCase) != 0) { ob = lookupTable.IgnoreCaseGet(name); } if (ob == null) { if (lookForInstanceMembers && (bindingAttr & BindingFlags.Static) != 0) { return(this.GetMember(name, bindingAttr & ~BindingFlags.Instance)); } else { return(TypeReflector.EmptyMembers); } } } int index = (int)ob; MemberInfo[] members = this.memberInfos[index]; if (members == null) { return(this.GetNewMemberArray(name, index)); } return(members); }
public override MemberInfo[] GetMember(string name, BindingFlags bindingAttr) { bool flag = (bindingAttr & BindingFlags.Instance) != BindingFlags.Default; SimpleHashtable hashtable = flag ? this.instanceMembers : this.staticMembers; object obj2 = hashtable[name]; if (obj2 == null) { if ((bindingAttr & BindingFlags.IgnoreCase) != BindingFlags.Default) { obj2 = hashtable.IgnoreCaseGet(name); } if (obj2 == null) { if (flag && ((bindingAttr & BindingFlags.Static) != BindingFlags.Default)) { return(this.GetMember(name, bindingAttr & ~BindingFlags.Instance)); } return(EmptyMembers); } } int index = (int)obj2; MemberInfo[] infoArray = this.memberInfos[index]; if (infoArray == null) { return(this.GetNewMemberArray(name, index)); } return(infoArray); }