コード例 #1
0
        public FriendSettingList Copy()
        {
            FriendSettingList copy = new FriendSettingList();

            foreach (var friendSetting in FriendSettings)
            {
                copy.FriendSettings.Add(friendSetting.Copy());
            }
            return(copy);
        }
コード例 #2
0
        public FriendSettingList GetFriendSettingListById(string id)
        {
            FriendSettingList friendSettingList = new FriendSettingList();

            foreach (var friendSetting in FriendSettings)
            {
                if (friendSetting.GetId().Equals(id))
                {
                    friendSettingList.FriendSettings.Add(friendSetting);
                }
            }
            return(friendSettingList);
        }
コード例 #3
0
        public FriendSetting GetFriendSettingFromAgreeById(string id)
        {
            FriendSettingList agreeList = GetFriendSettingListByStatus(FriendSettingStatus.AGREE);

            foreach (var friendSetting in agreeList.FriendSettings)
            {
                if (friendSetting.GetId().Equals(id))
                {
                    return(friendSetting);
                }
            }
            return(null);
        }
コード例 #4
0
        public FriendSettingList GetFriendSettingListByStatus(FriendSettingStatus status)
        {
            FriendSettingList searchList = new FriendSettingList();

            foreach (var friendSetting in FriendSettings)
            {
                if (friendSetting.GetStatus().Equals(status))
                {
                    searchList.FriendSettings.Add(friendSetting);
                }
            }
            return(searchList);
        }