public FriendSettingList Copy() { FriendSettingList copy = new FriendSettingList(); foreach (var friendSetting in FriendSettings) { copy.FriendSettings.Add(friendSetting.Copy()); } return(copy); }
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); }
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); }
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); }