protected override void Initialize() { if (members != null) { return; } members = new Dictionary <SymbolId, List <ReflectedMember> >(); MemberInfo[] infos = type.GetMembers(); foreach (MemberInfo info in infos) { object[] attrs = info.GetCustomAttributes(typeof(FoxPro.Runtime.FoxProNameAttribute), false); if (attrs == null || attrs.Length == 0) { continue; } FoxPro.Runtime.FoxProNameAttribute attr = attrs[0] as FoxPro.Runtime.FoxProNameAttribute; ReflectedMember md = CreateMemberDefinition(info); if (md != null) { SymbolId name = SymbolTable.StringToId(attr.name); List <ReflectedMember> list; if (!members.TryGetValue(name, out list)) { members[name] = list = new List <ReflectedMember>(); } list.Add(md); } } }
protected virtual void Initialize() { if (members != null) { return; } MemberInfo[] infos = type.GetMembers(); members = new Dictionary <SymbolId, List <ReflectedMember> >(); foreach (MemberInfo info in infos) { ReflectedMember md = CreateMemberDefinition(info); if (md != null) { List <ReflectedMember> list; SymbolId name = SymbolTable.StringToId(info.Name); if (!members.TryGetValue(name, out list)) { members[name] = list = new List <ReflectedMember>(); } list.Add(md); } } }