protected override IEnumerable <SelectedMemberInfo> OnSelectMembers(IEnumerable <SelectedMemberInfo> selectedMembers,
                                                                     string currentPath, IMemberInfo context)
 {
     return(selectedMembers
            .Where(memberInfo => !memberToExclude.IsSameAs(new MemberPath(memberInfo.DeclaringType, currentPath.Combine(memberInfo.Name))))
            .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());
        }
 protected override void AddOrRemoveMembersFrom(List <IMember> selectedMembers, INode parent, string parentPath,
                                                MemberSelectionContext context)
 {
     selectedMembers.RemoveAll(member =>
                               memberToExclude.IsSameAs(new MemberPath(member, parentPath)));
 }