示例#1
0
        private void searchFriends()
        {
            List <User> friends = m_FacebookHandler.FetchFriends();

            ISet <User> religionFilteredUsers           = Utils.GetFilteredUsers <eReligion>(friends, r_ReligionsToPresent, (user, religion) => user.Religion.Equals(religion));
            ISet <User> genderFilteredUsers             = Utils.GetFilteredUsers <User.eGender>(friends, r_GenderToPresent, (user, gender) => user.Gender.Equals(gender));
            ISet <User> relationshipStatusFilteredUsers = Utils.GetFilteredUsers <User.eRelationshipStatus>(friends, r_RelationshipStatusesToPresent, (user, relationshipStatus) => user.RelationshipStatus.Equals(relationshipStatus));

            m_FilteredFriends.Items.Clear();

            foreach (User friend in friends)
            {
                if (religionFilteredUsers.Contains(friend) && genderFilteredUsers.Contains(friend) && relationshipStatusFilteredUsers.Contains(friend))
                {
                    m_FilteredFriends.Items.Add(friend.Name);
                }
            }
        }
示例#2
0
 public List <User> FetchFriends()
 {
     MessageBox.Show("About to fetch friends");
     return(m_FacebookHandler.FetchFriends());
 }