public MessengerObject AddFriendToCategory(Friend friend, Category category) { AddFriendToCategory(friend.Befriendable, category); return this; }
public MessengerObject RemoveFriend(Friend friend) { RemoveFriend(friend.Befriendable.GetID()); return this; }
public MessengerObject RemoveFriendFromCategory(Friend friend, Category category) { RemoveFriendFromCategory(friend.Befriendable.GetID(), category); return this; }
/// <summary> /// Add an IBefriendable as a friend only if the IBefriendable is not already a friend. /// </summary> /// <param name = "befriendable">The IBefriendable to add.</param> /// <returns>The instance of MessengerObject this was called on. This allows for chaining.</returns> public MessengerObject AddNewFriend(IBefriendable befriendable) { if (_friends.ContainsKey(befriendable.GetID())) return this; Friend friend = new Friend(befriendable); _friends.Add(befriendable.GetID(), friend); return this; }