예제 #1
0
 /// <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;
 }
예제 #2
0
 public MessengerObject AddFriendToCategory(Friend friend, Category category)
 {
     AddFriendToCategory(friend.Befriendable, category);
     return this;
 }
예제 #3
0
 public MessengerObject RemoveFriendFromCategory(IBefriendable befriendable, Category category)
 {
     RemoveFriendFromCategory(befriendable.GetID(), category);
     return this;
 }
예제 #4
0
 public MessengerObject RemoveFriendFromCategory(int friendID, Category category)
 {
     if (category.Friends.ContainsKey(friendID))
         category.Friends.Remove(friendID);
     return this;
 }
예제 #5
0
 public MessengerObject RemoveFriendFromCategory(Friend friend, Category category)
 {
     RemoveFriendFromCategory(friend.Befriendable.GetID(), category);
     return this;
 }
예제 #6
0
 public MessengerObject RemoveCategory(Category category)
 {
     RemoveCategory(category.ID);
     return this;
 }
예제 #7
0
        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;
        }
예제 #8
0
 public Friend RemoveFromCategory(Category category)
 {
     category.Owner.RemoveFriendFromCategory(this, category);
     return this;
 }
예제 #9
0
 public Friend AddFriend(Category category)
 {
     category.Owner.AddFriendToCategory(this, category);
     return this;
 }