/// <summary> /// </summary> /// <param name = "category"></param> /// <returns></returns> public MessengerObject AddCategory(Category category) { if (_categories.ContainsKey(category.ID)) return this; _categories.Add(category.ID, category); return this; }
public MessengerObject AddFriendToCategory(Friend friend, Category category) { AddFriendToCategory(friend.Befriendable, category); return this; }
public MessengerObject RemoveFriendFromCategory(IBefriendable befriendable, Category category) { RemoveFriendFromCategory(befriendable.GetID(), category); return this; }
public MessengerObject RemoveFriendFromCategory(int friendID, Category category) { if (category.Friends.ContainsKey(friendID)) category.Friends.Remove(friendID); return this; }
public MessengerObject RemoveFriendFromCategory(Friend friend, Category category) { RemoveFriendFromCategory(friend.Befriendable.GetID(), category); return this; }
public MessengerObject RemoveCategory(Category category) { RemoveCategory(category.ID); return this; }
public MessengerObject AddFriendToCategory(IBefriendable befriendable, Category category) { if (!_friends.ContainsKey(befriendable.GetID())) return this; Friend friend = _friends[befriendable.GetID()]; if (!friend.Categories.ContainsKey(category.ID)) friend.Categories.Add(category.ID, category); if (!category.Friends.ContainsKey(befriendable.GetID())) category.Friends.Add(befriendable.GetID(), befriendable); return this; }
public Friend RemoveFromCategory(Category category) { category.Owner.RemoveFriendFromCategory(this, category); return this; }
public Friend AddFriend(Category category) { category.Owner.AddFriendToCategory(this, category); return this; }