protected override IEnumerable <SelectedMemberInfo> OnSelectMembers(IEnumerable <SelectedMemberInfo> selectedMembers, string currentPath, IMemberInfo context) { var matchingMembers = from member in context.RuntimeType.GetNonPrivateMembers() where pathToInclude.IsParentOrChildOf(currentPath.Combine(member.Name)) select member; return(selectedMembers.Concat(matchingMembers).ToArray()); }
protected override void AddOrRemoveMembersFrom(List <IMember> selectedMembers, INode parent, string parentPath, MemberSelectionContext context) { foreach (MemberInfo memberInfo in context.Type.GetNonPrivateMembers(MemberVisibility.Public | MemberVisibility.Internal)) { var memberPath = new MemberPath(context.Type, memberInfo.DeclaringType, parentPath.Combine(memberInfo.Name)); if (memberToInclude.IsSameAs(memberPath) || memberToInclude.IsParentOrChildOf(memberPath)) { selectedMembers.Add(MemberFactory.Create(memberInfo, parent)); } } }
protected override IEnumerable <SelectedMemberInfo> OnSelectMembers(IEnumerable <SelectedMemberInfo> selectedMembers, string currentPath, IMemberInfo context) { IEnumerable <SelectedMemberInfo> matchingMembers = from member in context.RuntimeType.GetNonPrivateMembers() let memberPath = new MemberPath(member.DeclaringType, currentPath.Combine(member.Name)) where memberToInclude.IsSameAs(memberPath) || memberToInclude.IsParentOrChildOf(memberPath) select member; return(selectedMembers.Concat(matchingMembers).ToArray()); }